Detect use of .NET Aspire DbContext methods & don't add standard DbContext services calls when they're present
Open
area-scaffolding
- Dominant language
- C#
- Stars
- 818
- Forks
- 260
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 10
Description
.NET Aspire includes components for using various Entity Framework Core providers. At the moment, the scaffolders that include EF Core aren't aware of the top-level methods that register the `DbContext` with the app's DI and thus add additional calls to add the `DbContext` the non-Aspire way, which leads to [issues](https://github.com/dotnet/aspire/issues/744).
We should consider updating the EF Core scaffolders to detect the use of .NET Aspire and not add the calls to `AddDbContext` in those cases.
Contributor guide
Assessment
This issue has not been assessed yet.