Configuration for EFCore DbContext #662
-
The link from the documentation for EFCoreStoreSamples does not work. I'm struggle to figure out how to implement the tenant store using an EFCore Db which implements IdentityUser. Can anyone provide an example? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, I'm sorry the link is broken. Here's a link to the last version that had it. It's ASP.NET Core 3.0 but most of it is still applicable.
Are you sure you want to do this? The multitenant store itself is not multitenant. It's the store of tenant data. I usually use a separate multitenant dbcontext for Identity so that I can have different sets of users/roles/etc for each tenant. If you do want to use the same dbcontext make sure you have a way to initialize the dbcontext without an active tenant (because the store will be used before at tenant is known... to determine the tenant). |
Beta Was this translation helpful? Give feedback.
Hi, I'm sorry the link is broken. Here's a link to the last version that had it.
It's ASP.NET Core 3.0 but most of it is still applicable.
Are you sure you want to do this? The multitenant store itself is not multitenant. It's the store of tenant data. I usually use a separate multitenant dbcontext for Identity so that I can have different sets of users/roles/etc for each tenant.
If you do want to use the same dbcontext make sure you have a way to initialize the dbcontext without an active tenant (because the store will be used before at tenant is known... to determine the tena…