Sparkdo.TenantManagement.EntityFrameworkCore 1.0.1

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Sparkdo.TenantManagement.EntityFrameworkCore --version 1.0.1
                    
NuGet\Install-Package Sparkdo.TenantManagement.EntityFrameworkCore -Version 1.0.1
                    
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="Sparkdo.TenantManagement.EntityFrameworkCore" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sparkdo.TenantManagement.EntityFrameworkCore" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Sparkdo.TenantManagement.EntityFrameworkCore" />
                    
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 Sparkdo.TenantManagement.EntityFrameworkCore --version 1.0.1
                    
#r "nuget: Sparkdo.TenantManagement.EntityFrameworkCore, 1.0.1"
                    
#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 Sparkdo.TenantManagement.EntityFrameworkCore@1.0.1
                    
#: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=Sparkdo.TenantManagement.EntityFrameworkCore&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Sparkdo.TenantManagement.EntityFrameworkCore&version=1.0.1
                    
Install as a Cake Tool

Sparkdo 租户管理 Entity Framework Core 集成层

简介

Sparkdo 租户管理 Entity Framework Core 集成层提供了租户管理模块的数据库访问实现。该层基于 Entity Framework Core,实现了租户数据的持久化操作。

主要组件

数据库上下文

  • ITenantManagementDbContext:租户管理数据库上下文接口
  • TenantManagementDbContext:租户管理数据库上下文实现

仓储实现

  • EFCoreTenantRepository:Entity Framework Core 租户仓储实现
  • ITenantRepository:租户仓储接口(在领域层定义)

模型配置

  • SparkdoTenantManagementDbContextModelCreatingExtensions:租户管理数据库上下文模型构建扩展
  • TenantManagementEFCoreQueryableExtensions:租户管理 Entity Framework Core 查询扩展

模块配置

SparkdoTenantManagementEntityFrameworkCoreModule 模块负责配置:

  • Entity Framework Core 相关服务注册
  • 租户管理数据库上下文配置
  • 租户仓储的依赖注入配置

数据库表结构

租户表 (Tenants)

  • Id: 租户唯一标识
  • Name: 租户名称
  • NormalizedName: 租户标准化名称
  • EntityVersion: 实体版本号
  • CreationTime: 创建时间
  • CreatorId: 创建者ID
  • LastModificationTime: 最后修改时间
  • LastModifierId: 最后修改者ID
  • IsDeleted: 是否已删除
  • DeleterId: 删除者ID
  • DeletionTime: 删除时间

租户连接字符串表 (TenantConnectionStrings)

  • TenantId: 关联的租户ID
  • Name: 连接字符串名称
  • Value: 连接字符串值
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
1.0.2-preview.1 135 12/4/2025
1.0.1 166 11/27/2025
1.0.0 167 11/25/2025