Building Multitenant SaaS Applications with Tenant Isolation and Unlimited Scale on Azure SQL Database

Sign in to queue

The Discussion

  • User profile image
    Mike

    Can this be used by Code-First via Entity Framework? (how would that work, or is there information you can link us to?)

  • User profile image
    Paybackman

    @Mike:

     

    I was thinking the same thing. Great question. 

     

  • User profile image
    TorstenG

    @Mike:

    there are two parts to answer your question:

    1) Connections for individual tenants use regular SQL database connections and you can use EF Code First for this and it can create the database schema for you as you connect to a new database.

    2) The external tables for cross-database querying (for horizontal or vertical partitioning) need to be created and maintained manually. But, you can query them using EF when you connect to the head node that has your external table definitions.

Add Your 2 Cents