You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
QueryableValues are not working when using EFCore InternalServiceProvider due to missing service registration in the DI container.
Unable to resolve service for type 'BlazarTech.QueryableValues.IQueryableFactory'.
This is often because no database provider has been configured for this DbContext.
A provider can be configured by overriding the 'DbContext.OnConfiguring' method
or by using 'AddDbContext' on the application service provider.
If 'AddDbContext' is used, then also ensure that your DbContext type accepts a DbContextOptions<TContext> object in its constructor and passes it to the base constructor for DbContext.
Looks like the method QueryableValuesSqlServerExtension.ApplyServices is called on the instance of IServiceCollection that is not really taking part in the creation of the ServiceProvider since the instance of the ServiceProvider has already been built manually.
The text was updated successfully, but these errors were encountered:
Background
QueryableValues
are not working when using EFCoreInternalServiceProvider
due to missing service registration in the DI container.EF Core registration
DI registration of EF is given this way:
Test environment
.NET 6 runtime
Initial Investigation
Looks like the method
QueryableValuesSqlServerExtension.ApplyServices
is called on the instance ofIServiceCollection
that is not really taking part in the creation of theServiceProvider
since the instance of theServiceProvider
has already been built manually.The text was updated successfully, but these errors were encountered: