How to run code-first migrations to multiple tenants (separated by schemas)

c# ef-migrations entity-framework-6 model-view-controller multi-tenant

Question

We are developing a scholar system witch is a multi-tenant application using entity framework 6 MVC and CODE FIRST MIGRATIONS and that's the problem, our multi tenant uses schemas (Sql server 2012+) to separate the data but all the migrations are being generated with DBO schema. For the development there is no problem on doing that BUT... when going on production we need to run these migrations on all our client schemas. Is there a beautiful way to do that? What do you guys suggest us to do? Well my friends, thanks in advance :)

1
4
7/1/2016 1:24:13 PM

Accepted Answer

Here is your answer:

Read the following posts:

  1. entity-framework-and-multiple-schemas
  2. romiller.com/2011/05/23/ef-4-1-multi-tenant-with-code-first/

I am pretty sure, your problem will be solved by the provided links. Thanks

1
5/23/2017 12:01:49 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow