Finbuckle.MultiTenant.MongoFramework 0.6.0

dotnet add package Finbuckle.MultiTenant.MongoFramework --version 0.6.0                
NuGet\Install-Package Finbuckle.MultiTenant.MongoFramework -Version 0.6.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Finbuckle.MultiTenant.MongoFramework" Version="0.6.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Finbuckle.MultiTenant.MongoFramework --version 0.6.0                
#r "nuget: Finbuckle.MultiTenant.MongoFramework, 0.6.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Finbuckle.MultiTenant.MongoFramework as a Cake Addin
#addin nuget:?package=Finbuckle.MultiTenant.MongoFramework&version=0.6.0

// Install Finbuckle.MultiTenant.MongoFramework as a Cake Tool
#tool nuget:?package=Finbuckle.MultiTenant.MongoFramework&version=0.6.0                

Actions Status Codacy Badge codecov


This is an integration of MongoFramework and Finbuckle.MultiTenant.


Working samples are provided for all of the following.


Uses MongoFramework to provide a store for Finbuckle.MultiTenant.

Any MongoDbContext can be provided via injection to this store.
It does not require a specific interface or base class.

Isolated Data Per Tenant

Provides isolated data, either with shared data or database per tenant or both.

The MongoTenantStore allows for an option DefaultConnectionString that is added to any tenants that do not have their own ConnectionString

The MongoPerTenantConnection then accepts the ITenantInfo and uses its ConnectionString to connect to MongoDb.

The MongoPerDbContext passes along the Id from ITenantInfo to be used with a MongoTenantContext That context (in MongoFramework) provides isolated data access based on the tenant Id.

MongoDb optimized TenantInfo

TenantInfo optimized for MongoDb (Index on identifier, "Tenants" table name)
This is completely optional, but provided as a convenience. You can use any ITenantInfo you'd like.


  • DataIsolationSample - how to use the data isolation features
  • MongoTenantStoreSample - how to implement MongoTenantStore
  • CombinedSample - how to use both the MongoTenantStore and data isolation in one project
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.6.0 1,261 7/7/2023
0.5.1 4,518 2/9/2022
0.4.0 726 7/29/2021
0.3.0 488 12/19/2020
0.2.0 458 11/3/2020 478 10/31/2020
0.1.0 481 10/31/2020