MultiTenant 10.0.0
MultiTenant is an open source multi-tenancy library for modern .NET created and maintained by Finbuckle LLC. It enables tenant resolution, per-tenant app behavior, and per-tenant data isolation.
See https://www.finbuckle.com/MultiTenant for more details and documentation.
This release supports .NET 10.
Beginning with MultiTenant v10, major version releases align with .NET major version releases.
New development focuses on the latest MultiTenant release version while critical security and severe bug fixes will be released for prior versions which target .NET versions supported by Microsoft.
In general, you should target the version of MultiTenant that matches your .NET version.
Open Source Support
Table of Contents
- What's New in v10.0.0
- Open Source Support
- Quick Start
- Documentation
- Sample Projects
- Build and Test Status
- License
- .NET Foundation
- Code of Conduct
- Community
- Building from Source
- Running Unit Tests
What's New in v10.0.0
This section only lists release update details specific to v10.0.0. See the changelog file for all release update details.
⚠ BREAKING CHANGES
- In prior versions user provided generic types to the
MultiTenantIdentityDbContextfamily of classes were not mult-tenant by default. This was confusing and to simplify all are now multi-tenant by default. - The
RouteStrategywill include the tenant in the ambient route values used for link generation, similar toControllerandAction. Can be disabled via theWithRouteStrategyoverload taking a boolean foruseTenantAmbientRouteValueset to false. - General improvements in folder structure to reduce overnesting has caused namespace changes for certain types. Namely some stores and options types.
- BasePathStrategy default behavior is changed to rebase the aspnetcore path base. This was opt in before. Can be set via
BasePathStrategyOptions. - This was opt in before. Can be set via
BasePathStrategyOptions. - Namespaces were standardized to match folder locations.
- Making TenantInfo a record reduces risk of unintended changes to the current tenant. This change also removes
ITenantInfoandTenantInfoshould be used as the base for custom implementations. Note thatEFCoreStoreuses this record as an entity but takes care not to rely on tracking. - prior extension namespaces were inconsistent, now they are all
{PackageName}.Extensions, e.g.Finbuckle.MultiTenant.Options.Extensions - Per-tenant options support was previously part of the Finbuckle.MultiTenant package. Projects will need to reference the Finbuckle.MultiTenant.Options package going forward.
- Minor changes to the
IMultiTenantStoreinterface signatures. - Removes the 64 character limit on Tenant ID. This also removes the max length constraint where Tenant ID is used in EF Core if applicable.
IMultiTenantContextand its implementations are now immutable. Changes will require assigning a new instance.- Prior to this change anonymous filters were used and required special consideration in advanced scenarios. The change to named filters removes these considerations, but named filters cannot be mixed with anonymous filters.
- net8 and net9 targets were removed
- This change better isolates dependencies. Basic interfaces and types are now in the
Finbuckle.MultiTenant.Abstractionspackage andMultiTenantIdentityDbContextfunctionality is now in theFinbuckle.MultiTenant.Identity.EntityFrameworkCorepackage.
Features
- add
IsNotMultiTenantmethod to exclude entities from multi-tenancy in EF Core per-tenant data functionality. (b160826) - add Identity passkey multi-tenant support (7f0bf73)
- add MultiTenantAmbientValueLinkGenerator to promote tenant route values (#1041) (259511c)
- all projects target net10 (#1007) (1f02e8f)
- BasePathStrategy will rebase the aspnetcore path base by default (bd7f0d0)
- BasePathStrategy will rebase the aspnetcore path base by default (d107d81)
- expose many internal types as public and adjust namespaces (#1030) (f680843)
- Identity entity types are all multi-tenant by default on
MultiTenantIdentityDbContextvariants. (4e1bd9f) - immutable IMultiTenantContext (#1018) (03ddeb0)
- improve folder structure (#1040) (d46ce8c)
- improved depedency structure with
Finbuckle.MultiTenant.AbstractionsandFinbuckle.MultiTenant.Identity.EntityFrameworkCore(#1006) (e191d83) - improved store interface (#1020) (c6a16c4)
- improved xml comments (#1038) (fdd59b9)
- improved xml comments (#1038) (8ee6597)
- namespaces for extension methods changed (#1026) (318fcec)
- refactors per-tenant options into Finbuckle.MultiTenant.Options package (#1024) (ca4877f)
- removed max char length on TenantInfo (#1019) (37bb15b)
- TenantInfo is now a record and
ITenantInfois removed (#1029) (21559da) - use named global query filters in EF Core (#1016) (c3ac833)
Bug Fixes
- update dependencies (#1023) (69ac561)
- update dependencies (#1027) (b185944)
- update dependencies (#1037) (b168900)
Performance Improvements
Open Source Support
Your support helps keep the project going and is greatly appreciated!
Finbuckle.MultiTenant is primarily supported by its GitHub sponsors and contributors.
Additional support is provided by the following organizations:
Quick Start
MultiTenant is designed to be easy to use and follows standard .NET conventions as much as possible. See the Getting Started documentation for more details.
Documentation
The library builds on on basic multi-tenant functionality to provide a variety of higher level features. See the documentation for more details:
- Per-tenant Options
- Per-tenant Authentication
- Entity Framework Core Data Isolation
- ASP.NET Core Identity Data Isolation
Sample Projects
A variety of sample projects are available in the repository.
Build and Test Status
License
This project uses the Apache 2.0 license. See LICENSE file for license information.
.NET Foundation
This project is supported by the .NET Foundation.
Code of Conduct
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct or the CONTRIBUTING.md file.
Community
Check out the GitHub repository to ask a question, make a request, or peruse the code!
Building from Source
From the command line clone the git repository, cd into the new directory, and compile with dotnet build.
git clone https://github.com/Finbuckle/Finbuckle.MultiTenant.git
cd Finbuckle.MultiTenant
cd Finbuckle.MultiTenant
dotnet build
Running Unit Tests
Run the unit tests from the command line with dotnet test from the solution directory.
dotnet test