In our system it has become required to provide a multi-tenant solution, where each tenant has the same data structure.
During investigation I came across an article discussing multi-tenancy with EF4.1.
http://romiller.com/2011/05/23/ef-4-1-multi-tenant-with-code-first/
This looks like a sensible solution, but we would prefer to avoid multiple database contexts if possible.
Also, we have a large number of migrations for our current single tenant solution. With EF6, it is possible for a migration to target a specific context and when none is supported, a default is targeted.
I have a couple of quesions here:
- Is there a better approach to multi-tenancy when using EF6 other than that specified for EF4?
- Is there a better way to handle the migrations?
Any help is much appreciated!