Base solution for your next web application
Open Closed

Confusion over multi tenancy context creation / selection #1482


User avatar
0
webnoob created

Hi,

I'm not fully understanding something about the multi tenancy db contexts. I'm aiming for a single application with multiple tenant DB's and one host DB using .NET Core.

In the documentation (<a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Multi-Tenancy">http://www.aspnetboilerplate.com/Pages/ ... ti-Tenancy</a>) it says you can create a host DB context and a tenant DB context.

What should these host and tenant DB contexts derive from? I see from the Module Zero example, they derive from AbpZeroHostDbContext or AbpZeroTenantDbContext but those classes aren't bundled with the project. Should I be adding the dependency for AbpZero.EntityFramework and using it in the same way?

Many thanks, webnoob


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Yes you should add a dependency to AbpZero.EntityFramework.