You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NHibernate's Load method is really useful. Example:
var user = dbContext.Users.Load(42);
It does not perform SQL but creates a proxy object. If we want to use user's a properties, it's lazy loaded from DB. If we use only Id, it's not loaded from DB. Also, we may assign it to another entity's navigation property. Example:
var blog = new Blog(...);
blog.User = dbContext.Users.Load(42);
dbContext.Blogs.Add(blog);
dbContext.SaveChanges();
In this code, User 42 is never fetched from DB since we did not used it's properties (other than Id).
The text was updated successfully, but these errors were encountered:
Team Triage: We agree this would be useful. We're not going to tackle it in the initial release of EF Core but leaving active to look at in the future.
Hi,
NHibernate's Load method is really useful. Example:
It does not perform SQL but creates a proxy object. If we want to use user's a properties, it's lazy loaded from DB. If we use only Id, it's not loaded from DB. Also, we may assign it to another entity's navigation property. Example:
In this code, User 42 is never fetched from DB since we did not used it's properties (other than Id).
The text was updated successfully, but these errors were encountered: