Přeskočit na hlavní obsah

Multitenancy

Overview

Multitenancy is a reference to the mode of operation of software where multiple independent instances of one or multiple applications operate in a shared environment. The instances (tenants) are logically isolated, but physically integrated.

This Core support to allow persistence and domain logic about Multitenancy.

Install

  • ASOL.Core.Multitenancy - base implementation of multitenancy.
  • ASOL.Core.Multitenancy.Abstractions - Interfaces and supporting clases for multitenancy.
  • ASOL.Core.Multitenancy.AspNetCore - ASP.NET Core (.net standard 2.0) extensions for enable multitenancy in ASP.NET Core projects.
  • ASOL.Core.Multitenancy.MongoDb - Extensions to get database context to access MongoDb tenant database.
  • ASOL.Core.Multitenancy.EfCore - Extensions to get database context to access Entity Framework Core tenant database.

Changelog

  • 0.0.1.47910-dev
    • BREAKING CHANGE: Dependency on ASOL.Core.Identity.Abstractions of the version 0.0.1.47819-dev
    • BREAKING CHANGE: ASOL.Core.Multitenancy.MongoDb depends on ASOL.Core.Persistence.MongoDb of the version 0.0.1.47908-dev (from this version onwards, this dependency only supports .NET 8)
    • BREAKING CHANGE: ASOL.Core.Multitenancy.EfCore: depends on ASOL.Core.Persistence.EFCore of the version 0.0.1.47908-dev (from this version onwards, this dependency only supports .NET 8)
    • BREAKING CHANGE: Methods for creating master DbContext and master repository have been removed from IRepoFactory and moved to new factory IMasterRepoFactory in package ASOL.Core.Persistence.
  • 0.0.1.44943-dev
    • BREAKING CHANGE: ASOL.Core.Multitenancy.MongoDb depends on ASOL.Core.Persistence.MongoDb of the version 0.0.1.42561-dev (from this version onwards, this dependency only supports .NET 8)
    • BREAKING CHANGE: ASOL.Core.Multitenancy.EfCore: depends on ASOL.Core.Persistence.EFCore of the version 0.0.1.42561-dev (from this version onwards, this dependency only supports .NET 8)
  • 0.0.1.44924-dev
    • BREAKING CHANGE: Support for older .NET frameworks has been removed; only .NET 8 is now supported.

Dependency injection

Mandatory dependency injection for Multitenancy

public void ConfigureServices(IServiceCollection services)
{
services.AddMultitenancy()
.AddAuthorization();
}

public void Configure(IApplicationBuilder app)
{
app.UseAuthentication();
app.UseMultitenancy();
}

Core packages relationships

../images/sdk-multitenancy01.png