Search code examples
c#asp.netsql-serverazureelastic-database-pool

How do you set up multi-tenancy with Azure's elastic databases?


I am looking for documentation or an example that shows how to set up a multi-tenancy application on Azure using elastic databases. I find lots of theory on it, but cannot seem to track down a concrete example of how to configure azure with an application and a distinct website. For example, there are lots of examples of how to create the elastic pool, etc. but no C# coding examples.

What we have is a traditional website with a database. The database doesn't support multi-tenancy, so what I was thinking was we could make the offering multi-tenant by creating a separate database for each client.

How does a client access the platform with an elastic database? How do I create databases and access points on the fly? etc.


Solution

  • There's a wingtipSaas that has actual code examples and documentation: https://github.com/Microsoft/WingtipSaaS

    Also, read this recent blog post from Azure team: https://azure.microsoft.com/en-us/blog/saas-patterns-accelerate-saas-application-development-on-sql-database/