AutoInclude via data annotations
Open
area-model-building
customer-reported
- Dominant language
- C#
- Stars
- 14.8k
- Forks
- 3.4k
- PR merge metrics
- PR metrics pending
Description
AutoInclude is a [not much documented, but very useful feature](https://dotnetcoretutorials.com/2021/03/07/eager-load-navigation-properties-by-default-in-ef-core/) since ef core 5, that allows you to load related entities automatically with model builder like this:
`builder.Navigation(x => x.ContactEmails).AutoInclude();`
I would like to be able to configure this by data annotaions on the model like this:
```
[AutoInclude]
public ICollection ContactEmails {get; set;}
```
Contributor guide
Assessment
This issue has not been assessed yet.