DylansTechStack.Pro.Tenancy.AspNetCore 0.7.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package DylansTechStack.Pro.Tenancy.AspNetCore --version 0.7.0
                    
NuGet\Install-Package DylansTechStack.Pro.Tenancy.AspNetCore -Version 0.7.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="DylansTechStack.Pro.Tenancy.AspNetCore" Version="0.7.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DylansTechStack.Pro.Tenancy.AspNetCore" Version="0.7.0" />
                    
Directory.Packages.props
<PackageReference Include="DylansTechStack.Pro.Tenancy.AspNetCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DylansTechStack.Pro.Tenancy.AspNetCore --version 0.7.0
                    
#r "nuget: DylansTechStack.Pro.Tenancy.AspNetCore, 0.7.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.
#:package DylansTechStack.Pro.Tenancy.AspNetCore@0.7.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DylansTechStack.Pro.Tenancy.AspNetCore&version=0.7.0
                    
Install as a Cake Addin
#tool nuget:?package=DylansTechStack.Pro.Tenancy.AspNetCore&version=0.7.0
                    
Install as a Cake Tool

DTS Pro

The opinionated, paid layer on DTS.DDD, the open DDDToolkit core. DTS.DDD is usable by anyone and makes no choices for an application. A DTS Pro package makes those choices: it is a supporting domain that an application adds whole.

Package Namespace What it is
DylansTechStack.Pro.Tenancy DTS.Tenancy Tenancy: tenants, their organization tree, seats and roles over a permission catalogue, a service per aggregate, and the access manager. No database in it.
DylansTechStack.Pro.Tenancy.Abstractions DTS.Tenancy Tenancy's markers for domain classes, such as [OfTenant].
DylansTechStack.Pro.Tenancy.EntityFramework DTS.Tenancy.EntityFramework Tenancy in a context of your own, on every provider.
DylansTechStack.Pro.Tenancy.Postgres DTS.Tenancy.Postgres Tenancy's queries as SQL functions, its row level security policies, and the start-up checks.
DylansTechStack.Pro.Tenancy.AspNetCore DTS.Tenancy.AspNetCore app.UseTenantSelection(): the Tenant header names the tenant of a request, and the caller's active seat there becomes the Tenancy user.
DylansTechStack.Pro.Membership DTS.Membership Membership: access to a resource through its members and the roles they hold. No database in it.
DylansTechStack.Pro.Membership.Abstractions DTS.Membership Membership's markers for domain classes, such as [At].
DylansTechStack.Pro.Membership.EntityFramework DTS.Membership.EntityFramework A resource's members in a context of your own.
DylansTechStack.Pro.Licensing DTS.Licensing The licence key check. Tenancy and Membership depend on it.
DylansTechStack.Pro.Membership.Postgres DTS.Membership.Postgres A resource's access queries as SQL functions for row access rules.

The docs are on the public docs site, under Tenancy and Membership.

The repository

  • core/ is the public repository, DylanSnel/DDDToolkit, as a git submodule. Every project here references the core's projects in it, and the root's Directory.Build.props, Directory.Build.targets and Directory.Packages.props import the core's.
  • Source/ holds the packages, in one folder per domain: Source/Tenancy and Source/Membership.
  • Tests/ holds their tests in the same domain folders: Tests/Tenancy and Tests/Membership.
  • Tests/Together holds the tests that use Tenancy and Membership in one host. It also holds the core's tests that compile against both domains: DTS.Pro.Analyzers.Tests and DTS.Pro.HotChocolate.Tests compile the core's test project and add the parts that need Tenancy or Membership.
  • Tests/Examples.Tenancy.Tests and Tests/Examples.Tenancy.AppHost.Tests test the sample. The core's docs link to these paths, so they stay at the top of Tests/.
  • Examples/Tenancy is the Tenancy sample.

Clone with the submodule:

git clone --recurse-submodules https://github.com/DIDIT-Solutions/DTS.Pro.git

Versions and the feed

Every DylansTechStack.* package has one version, the core's included. A release of DTS Pro is made from a commit whose core/ is the core's release of the same version. The core's packages and DTS Pro's packages are on nuget.org, so an application needs no extra feed, nuget.config or token.

The packages of DTS Pro are under the commercial licence in LICENSE. The packages of the core are under the MIT licence.

  • Development, tests, continuous integration, staging, demos and evaluation are free and need no licence key.
  • An organisation with less than EUR 1,000,000 revenue and less than EUR 3,000,000 outside capital asks for a free Community licence key for production.
  • Every other production use needs a commercial licence key.

Licence key

An application that uses DTS Pro sets its licence key at DTS:Licence in the configuration, in appsettings.json or in the environment variable DTS__Licence.

{
  "DTS": {
    "Licence": "DTS1.eyJpZCI6Ij...In0.MEUCIQ..."
  }
}
  • AddTenancyCore and AddMembership register their module with AddLicensedModule. That method registers the hosted service LicenceCheck once.
  • LicenceCheck reads the key once when the host starts. It checks the signature with the public key in LicenceCheck.PublicKey, the expiry date, and that the key lists every module in use.
  • A valid key is logged as information. A missing, invalid or expired key, or a key without a module in use, is logged as a warning in the log category DTS.Licensing. In the Development environment it is logged as information.
  • The check never stops the host and needs no network.

A key is DTS1., the licence as base64url JSON, a period, and an ECDSA P-256 signature over the JSON part. The licence holds an id, the customer, the modules, the issue day and the last valid day.

build/LicenceTool makes the keys. It is no package.

# A new key pair. The public key goes into LicenceCheck.PublicKey.
dotnet run --project build/LicenceTool -- new-keys

# A key for a customer. The private key comes from DTS_LICENCE_PRIVATE_KEY.
dotnet run --project build/LicenceTool -- sign --customer "Harbor Works" --modules Tenancy,Membership --expires 2027-12-31
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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.9.0 49 11/22/2026
0.7.0 49 11/22/2026
0.6.0 48 11/22/2026