-
-
Notifications
You must be signed in to change notification settings - Fork 254
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
EFCoreStoreDbContext does not work with AddDbContext #777
Comments
I solved my problem by implementing my custom store but issue is still present |
Hi I’m glad you got a workaround. Just for a quick test can you make your db context inherit just |
Yeah, in my workaround, I have DbContext inherited. MultiTenantStoreDbContext.cs
I think initial problem in store is that it is not passing Type with DbContextOptions, which is explicitly said it needs to be done by generated error. From what I seen, EFCoreStore have constructor with |
So I am trying to use EF Core DbContext with Postgres. I want to have two separate contexts for handling Tenants and Application. Since I already have DI configured, I wanted to also DI MultitenantStoreDbContext. I also need to pass connection string so I can differ from Development and Production.
Migrations break 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
DependencyInjection.cs
MultiTenantStoreDbContext.cs
The text was updated successfully, but these errors were encountered: