From 6b9255b37b86dcfc4f35fa526555795a5bd834b7 Mon Sep 17 00:00:00 2001 From: Sean Killeen Date: Tue, 3 May 2022 08:31:36 -0400 Subject: [PATCH] Move warning to the top of the section For better visibility & understanding before someone undertakes the steps. --- entity-framework/core/miscellaneous/multitenancy.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/entity-framework/core/miscellaneous/multitenancy.md b/entity-framework/core/miscellaneous/multitenancy.md index 96ec06abdd..51cd9f7bd4 100644 --- a/entity-framework/core/miscellaneous/multitenancy.md +++ b/entity-framework/core/miscellaneous/multitenancy.md @@ -65,6 +65,9 @@ Notice that the [service lifetime](/dotnet/core/extensions/dependency-injection# ## Multiple schemas +> [!WARNING] +> This scenario is not directly supported by EF Core and is not a recommended solution. + In a different approach, the same database may handle `tenant1` and `tenant2` by using table schemas. - **Tenant1** - `tenant1.CustomerData` @@ -77,9 +80,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) => modelBuilder.Entity().ToTable(nameof(CustomerData), tenant); ``` -> [!WARNING] -> This scenario is not directly supported by EF Core and is not a recommended solution. - ## Multiple databases and connection strings The multiple database version is implemented by passing a different connection string for each tenant. This can be configured at startup by resolving the service provider and using it to build the connection string. A connection string by tenant section is added to the `appsettings.json` configuration file.