PlumX.Core.DomainBase.EntityFramework 1.0.0-preview.7

This is a prerelease version of PlumX.Core.DomainBase.EntityFramework.
dotnet add package PlumX.Core.DomainBase.EntityFramework --version 1.0.0-preview.7
                    
NuGet\Install-Package PlumX.Core.DomainBase.EntityFramework -Version 1.0.0-preview.7
                    
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="PlumX.Core.DomainBase.EntityFramework" Version="1.0.0-preview.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PlumX.Core.DomainBase.EntityFramework" Version="1.0.0-preview.7" />
                    
Directory.Packages.props
<PackageReference Include="PlumX.Core.DomainBase.EntityFramework" />
                    
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 PlumX.Core.DomainBase.EntityFramework --version 1.0.0-preview.7
                    
#r "nuget: PlumX.Core.DomainBase.EntityFramework, 1.0.0-preview.7"
                    
#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 PlumX.Core.DomainBase.EntityFramework@1.0.0-preview.7
                    
#: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=PlumX.Core.DomainBase.EntityFramework&version=1.0.0-preview.7&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=PlumX.Core.DomainBase.EntityFramework&version=1.0.0-preview.7&prerelease
                    
Install as a Cake Tool

PlumX.Core.DomainBase.EntityFramework

NuGet 包 ID:PlumX.Core.DomainBase.EntityFramework

定位

PlumX.Core.DomainBase.EntityFramework 是 DomainBase 的 EF Core 实现包,包含仓储基类、DbContext 扩展、审计拦截和多仓储/多 DbContext 事务协调。它将 DomainBase 中被排除的 EF 相关源文件以链接方式编译进当前项目。

目标框架与依赖

  • 目标框架:net8.0
  • 项目引用:PlumX.Core.DomainBase
  • 主要依赖:Microsoft.EntityFrameworkCore、Microsoft.EntityFrameworkCore.Relational

接入方式

应用先注册自己的 DbContext,再让仓储继承 BaseRepository<TContext>CustomRepository<TContext>;需要审计时继承 AuditDbContextBase 并注册 IAuditUserProvider。数据库 provider、连接字符串和迁移由业务项目决定。

主要 API

  • BaseRepositoryCustomRepository:CRUD、分页、Merge、事务和变更回滚。
  • AuditDbContextBaseAuditEntity:SaveChanges 前后审计。
  • TransactionCoordinatorTransactionMultiDBContext:事务协调。
  • DbContextExtend:创建、编辑、真删除、伪删除和批量扩展。

配置与边界

本项目不自动选择 SQL Server/MySQL,也不声称跨数据库原子提交。审计记录属于业务数据库模型,敏感字段应使用 [NotAuditable] 排除;调用方必须明确 DbContext 的作用域和释放边界。

完整使用示例

DbContext、仓储与审计边界的最小接入见 模块使用示例

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.0-preview.7 60 9/2/2026
1.0.0-preview.6 59 9/1/2026
1.0.0-preview.5 73 8/31/2026
1.0.0-preview.4 64 8/19/2026
1.0.0-preview.3 61 8/18/2026
1.0.0-preview.1 72 8/14/2026