dotnet / dotnet/EntityFramework.Docs
Suggest change to clarify access modifier required when using Lazy Loading Proxies
- Dominant language
- Mermaid
- Stars
- 1.7k
- Forks
- 2k
- Avg merge
- 7d 23h
- Merged PRs (30d)
- 16
Description
When combining entity type constructors with lazy-loading proxies (enabled via a call to `UseLazyLoadingProxies(true)`), model constructors must be at a minimum `protected`, or exceptions will be thrown.
Suggest changing this line:
> The constructor can be public, private, or have any other accessibility.
to:
> The constructor can be public, private, or have any other accessibility. However when using Lazy Loading Proxies the constructor must be, at minimum, protected.
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: ecc7aedf-6301-7ec7-4f65-81749b1f54c8
* Version Independent ID: d0774ffa-c841-e6df-72de-d7f53c0d6f6f
* Content: [Entity types with constructors - EF Core](https://docs.microsoft.com/en-us/ef/core/modeling/constructors)
* Content Source: [entity-framework/core/modeling/constructors.md](https://github.com/aspnet/EntityFramework.Docs/blob/master/entity-framework/core/modeling/constructors.md)
* Product: **entity-framework**
* GitHub Login: @ajcvickers
* Microsoft Alias: **divega**
Contributor guide
Assessment
This issue has not been assessed yet.