Entity Framework Eager Load Not Returning Data, Lazy Load Does

后端 未结 3 1091
梦谈多话
梦谈多话 2020-11-30 10:05

I\'m using code first EF5 and I have an object which has a collection defined as virtual (lazy loaded). This returns data when called. However

3条回答
  •  醉梦人生
    2020-11-30 10:51

    You will need to use the include method to force load of the ICollections within your entities with eager loading. The follwing link might help you: http://msdn.microsoft.com/en-us/data/jj574232.aspx

提交回复
热议问题