Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UUF ported issue: Clarify EF Core Lazy loading #4966

Open
wadepickett opened this issue Mar 4, 2025 · 0 comments
Open

UUF ported issue: Clarify EF Core Lazy loading #4966

wadepickett opened this issue Mar 4, 2025 · 0 comments

Comments

@wadepickett
Copy link
Contributor

Type of issue

Typo

Description

The following is customer feedback filed as an Issue in UUF from ADO that has been ported to here:

The following text from this topic could use some clarification:

"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."

This implies that navigation properties need to be virtual for lazy loading to work when using UseLazyLoadingProxies. However, it does not explicitly state that all navigation properties must be marked as virtual when using this method, which can lead to confusion.

The text here is unclear.It is implied that navigation properties need not be virtual, and that lazy-loading will only apply to virtual navigation properties. However, it seems that calls to "UseLazyLoadingProxies" means that all navigation properties MUST be marked virtual. This is not clearly stated in the document.

Page URL

https://learn.microsoft.com/en-us/ef/core/querying/related-data/lazy

Content source URL

https://github.com/dotnet/EntityFramework.Docs/blob/main/entity-framework/core/querying/related-data/lazy.md

Document Version Independent Id

7c665098-afcc-1ba0-d6a2-0262ae921575

Article author

@roji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant