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
It seems like using it enforces marking all navigation properties with virtual. And if I don't do so I get this exception:
UseLazyLoadingProxies requires all entity types to be public, unsealed, have virtual navigation properties, and have a public or protected constructor.
Is this by design? Or is it better if I use "Lazy-loading without proxies" if I want to have some entities loaded differently.
The documentation doesn't mention this:
EF Core will then enable lazy-loading for any navigation property that can be overridden--that is, it must be virtual and on a class that can be inherited from
But it seems like all navigation properties must be virtual whether I want to use it or not.
The text was updated successfully, but these errors were encountered:
It would be helpful for the documentation to mention this. As it's written today it implies that only virtual properties will be overridden.
EF Core will then enable lazy loading for any navigation property that can be overridden--that is, it must be virtual and on a class that can be inherited from.
I'm just testing lazy loading feature in EF Core 2.1
https://docs.microsoft.com/en-us/ef/core/querying/related-data#lazy-loading
It seems like using it enforces marking all navigation properties with
virtual
. And if I don't do so I get this exception:Is this by design? Or is it better if I use "Lazy-loading without proxies" if I want to have some entities loaded differently.
The documentation doesn't mention this:
But it seems like all navigation properties must be virtual whether I want to use it or not.
The text was updated successfully, but these errors were encountered: