Skip to content

Finbuckle/Finbuckle.MultiTenant

Finbuckle Logo 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

  1. What's New in v10.0.0
  2. Open Source Support
  3. Quick Start
  4. Documentation
  5. Sample Projects
  6. Build and Test Status
  7. License
  8. .NET Foundation
  9. Code of Conduct
  10. Community
  11. Building from Source
  12. 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 MultiTenantIdentityDbContext family of classes were not mult-tenant by default. This was confusing and to simplify all are now multi-tenant by default.
  • The RouteStrategy will include the tenant in the ambient route values used for link generation, similar to Controller and Action. Can be disabled via the WithRouteStrategy overload taking a boolean for useTenantAmbientRouteValue set 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 ITenantInfo and TenantInfo should be used as the base for custom implementations. Note that EFCoreStore uses 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 IMultiTenantStore interface 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.
  • IMultiTenantContext and 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.Abstractions package and MultiTenantIdentityDbContext functionality is now in the Finbuckle.MultiTenant.Identity.EntityFrameworkCore package.

Features

  • add IsNotMultiTenant method 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 MultiTenantIdentityDbContext variants. (4e1bd9f)
  • immutable IMultiTenantContext (#1018) (03ddeb0)
  • improve folder structure (#1040) (d46ce8c)
  • improved depedency structure with Finbuckle.MultiTenant.Abstractions and Finbuckle.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 ITenantInfo is removed (#1029) (21559da)
  • use named global query filters in EF Core (#1016) (c3ac833)

Bug Fixes

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:

Digital Ocean logo

GitHub logo

Jetbrains logo

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:

Sample Projects

A variety of sample projects are available in the repository.

Build and Test Status

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

About

MultiTenant is an open source multi-tenancy library for modern .NET created and maintained by Finbuckle LLC.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project