We are using Asp.net Zero V 13.2.0 with.NET Core and Angular.
when I have tried to export user, then I got a below error.
An unhandled exception occurred while processing the request. HandlerException: Can't create component 'Demo.EntityFrameworkCore.DemoDbContext' as it has dependencies to be satisfied.
'Demo.EntityFrameworkCore.DemoDbContext' is waiting for the following dependencies:
- Service 'Microsoft.EntityFrameworkCore.DbContextOptions`1[[Demo.EntityFrameworkCore.DemoDbContext, Demo.EntityFrameworkCore, Version=13.2.0.0, Culture=neutral, PublicKeyToken=null]]' which was not registered.
12 Answer(s)
-
0
Hi @ismcagdas,
would you please check this issue as soon as possible. I am waiting your response.
-
0
Hi, I am waiting your response. please give me solution as soon as possible.
-
0
Hi,
Could you share your solution with [email protected] ? We will check the problem as soon as possible.
Thanks,
-
0
Hi,
Could you share your solution with [email protected] ? We will check the problem as soon as possible.
Thanks,
any other solution.
-
0
This seems like a generic error and we couldn't figure out the error without looking at your code.
-
0
This seems like a generic error, and we couldn't figure out the error without looking at your code.
ok. but I have one Question how to implement Tenant wise seed data for Country table?
is there any examples or documentation for having a separate seed per tenant?
-
0
This seems like a generic error, and we couldn't figure out the error without looking at your code.
ok. but I have one Question how to implement Tenant wise seed data for Country table?
is there any examples or documentation for having a separate seed per tenant?
Hi ismcagdas,
please give me Documentation Link, or any other Solution.
-
0
Hi,
In your solution you can take a look at
TenantRoleAndUserBuilder
and its usage. It is called as shown below;new TenantRoleAndUserBuilder(context, 1).Create();
Basically, you can get list of all tenants and execute the line above with the TenantId.
foreach(var tenant in tenants){ new TenantRoleAndUserBuilder(context, tenant.Id).Create(); }
-
0
Hi,
In your solution you can take a look at
TenantRoleAndUserBuilder
and its usage. It is called as shown below;new TenantRoleAndUserBuilder(context, 1).Create();
Basically, you can get list of all tenants and execute the line above with the TenantId.
foreach(var tenant in tenants){ new TenantRoleAndUserBuilder(context, tenant.Id).Create(); }
public static class SeedHelper { public static void SeedHostDb(IIocResolver iocResolver) { WithDbContext<lockthreatDbContext>(iocResolver, SeedHostDb); }
public static void SeedHostDb(lockthreatDbContext context) { context.SuppressAutoSetTenantId = true; //Host seed new InitialHostDbBuilder(context).Create(); //Default tenant seed (in host database). new DefaultTenantBuilder(context).Create(); new TenantRoleAndUserBuilder(context, 1).Create(); new TenantOrganizationUnits(context, 1).Create(); new FacilityTypeBuilder(context, 1).Create(); new PagesBuilder(context, 1).Create(); }
How to Get Tenant List Here
-
0
Hi,
You can use
context
object to retrieve list of Tenants. -
0
Hi,
You can use
context
object to retrieve list of Tenants.Thank you @ismcagdas.
-
0
You are welcome :)