Allow specifying service (interface) and implementation when calling AddNpgsqlDbContext #4114
Labels
area-app-model
Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Currently the method
AddNpgsqlDbContext
only allows for a concrete context type to be specified. This makes it difficult to use with both unit testing and Clean Architecture without jumping through a few additional hoops.It would be nice of there was an overload to
AddNpgsqlDbContext<TContext>()
with the signatureAddNpgsqlDbContext<TContextService, TContextImplementation>()
as there is for most of the existing EF extension methods for DI.The text was updated successfully, but these errors were encountered: