entity framework - How to update an object in the object context including its relationships -


i update object in object context data data source using code:

 public class project     {       public string id{get;set;}       public string name{get;set;}     }  public class people     {        public string id{get;set;}       public string name{get;set;}       public ilist<project> projectlist{get;set;}     }   ((system.data.entity.infrastructure.iobjectcontextadapter)orm).objectcontext.refresh(             system.data.objects.refreshmode.storewins, people); 

it updates people not projectlist(navigation properties),so question is: how update object including relationships?

as far know can't automatically that, refresh works on primitive properties of single object. if need additional refreshes need loop through objects , refresh each one.

naturally better approach reload entire graph eager loading, if don't need keep objects since you're refreshing them.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -