npgsql ef integration doesn't provide a callback that accepts an IServiceProvider
#7016
Open
1 task done
IServiceProvider
#7016
Is there an existing issue for this?
Describe the bug
I'm porting a codebase to use .NET Aspire and the way that it configures the DbContext is that it uses the callback that takes an
IServiceProvider
and the options builder: https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.entityframeworkservicecollectionextensions.adddbcontext?view=efcore-9.0#microsoft-extensions-dependencyinjection-entityframeworkservicecollectionextensions-adddbcontext-1(microsoft-extensions-dependencyinjection-iservicecollection-system-action((system-iserviceprovider-microsoft-entityframeworkcore-dbcontextoptionsbuilder))-microsoft-extensions-dependencyinjection-servicelifetime-microsoft-extensions-dependencyinjection-servicelifetime)Aspire doesn't provide access to this, only to the one that takes the
DbContextOptionsBuilder
, which means that we have to refactor how things are configured.Expected Behavior
If the Aspire integration is going to "shadow" the native integration, it should match the API surface area.
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version info
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: