Entity Framework 4 eager loading not working at all!
问题 I am converting linq2sql to entity framework. During the conversion I needed to convert the loadwith of linq2sql with include for eagar loading, but the eager loading is not working. When I used the profiler, I found that the child entities are loaded with they are accessed. DataBaseEntities context = new V3C_DataBaseEntities(); context.Agents.Include("Account"); Agent ag = context.Agents.Where(x => x.Login_ID == "2").SingleOrDefault(); // here the account should have been loaded, // but