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

Detect use of .NET Aspire DbContext methods & don't add standard DbContext services calls when they're present #2590

Open
DamianEdwards opened this issue Dec 1, 2023 · 1 comment

Comments

@DamianEdwards
Copy link
Member

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

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.

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

2 participants