I upgraded the first framework 4.3 entity database project to a new entity structure 5. Apparently now I am using DbContext instead of ObjectContext.
I replaced my old .edmx file with a new one. My old business code that previously used my 4.3.edmx file now has a problem with code using the LoadProperty method:
using (var context = new MyEntities()) { Models.User user = context.Users.First(x => x.GUID == guid); context.LoadProperty(user, o => o.Settings); return user; }
It seems that LoadProperty is not an accessible method in DbContext.
How can I get a strong typed load anyway?
I suggest that I could use
context.Users.Include("Settings")
but it is not strongly typed and subject to typos.
citronas
source share