Multi-tenancy in EF6 with multiple schemas having the same tables

  1. Context is connecting to a connection string, if the connection string is resolved at runtime, then you are using One dbcontext class with httprequest specific instance. to distinguish httprequest, host name headers can be used.
  2. There is no easy way to handle migration. This is a complex question, but in short, before the end of release 1, i normally create a initial migration with all scripts to provision the database, this is to help the database created after this change it not effected by any migrations down the track. and then add migration every time i need to change it. let me know if more details needed.