Sparkdo.Ddd.Application.Contracts
1.0.2
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Sparkdo.Ddd.Application.Contracts --version 1.0.2
NuGet\Install-Package Sparkdo.Ddd.Application.Contracts -Version 1.0.2
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.Ddd.Application.Contracts" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sparkdo.Ddd.Application.Contracts" Version="1.0.2" />
<PackageReference Include="Sparkdo.Ddd.Application.Contracts" />
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.Ddd.Application.Contracts --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Sparkdo.Ddd.Application.Contracts, 1.0.2"
#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.Ddd.Application.Contracts@1.0.2
#: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.Ddd.Application.Contracts&version=1.0.2
#tool nuget:?package=Sparkdo.Ddd.Application.Contracts&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Sparkdo.Ddd.Application.Contracts
Sparkdo DDD应用层契约库,提供应用服务接口定义和数据传输对象(DTO)基类。
功能特性
- 定义应用服务基础接口(CRUD操作)
- 提供常用的DTO基类(实体DTO、分页DTO等)
- 支持审计属性的DTO基类
- 支持本地化的分页请求参数验证
- 与Sparkdo框架无缝集成
安装
<PackageReference Include="Sparkdo.Ddd.Application.Contracts" Version="x.x.x" />
核心组件
应用服务接口
IApplicationService: 应用服务标记接口IReadOnlyAppService: 只读应用服务接口ICreateAppService: 创建应用服务接口IUpdateAppService: 更新应用服务接口IDeleteAppService: 删除应用服务接口ICreateUpdateAppService: 创建/更新应用服务接口ICrudAppService: 完整CRUD应用服务接口
DTO基类
EntityDto: 实体DTO基类CreationAuditedEntityDto: 包含创建审计信息的实体DTO基类AuditedEntityDto: 包含完整审计信息的实体DTO基类FullAuditedEntityDto: 包含软删除审计信息的实体DTO基类PagedResultDto: 分页结果DTOPageableRequestDto: 分页请求DTOLimitableRequestDto: 限制条数请求DTO
配置
SparkdoDddApplicationContractsModule: 模块配置类,负责注册本地化资源
扩展性
该库提供了DDD应用层的标准契约,可以通过以下方式扩展:
- 继承DTO基类创建具体的业务DTO
- 实现应用服务接口创建具体的业务应用服务
- 通过继承
LimitableRequestDto或PageableRequestDto创建自定义的请求参数类
代码结构说明
本项目包含以下主要组件:
应用服务接口
位于 Sparkdo/Application/Services 目录下:
IApplicationService.cs: 应用服务标记接口IReadOnlyAppService.cs: 只读应用服务接口ICreateAppService.cs: 创建应用服务接口IUpdateAppService.cs: 更新应用服务接口IDeleteAppService.cs: 删除应用服务接口ICreateUpdateAppService.cs: 创建/更新应用服务接口ICrudAppService.cs: 完整CRUD应用服务接口
DTO基类
位于 Sparkdo/Application/Dtos 目录下:
EntityDto.cs: 实体DTO基类CreationAuditedEntityDto.cs: 包含创建审计信息的实体DTO基类AuditedEntityDto.cs: 包含完整审计信息的实体DTO基类FullAuditedEntityDto.cs: 包含软删除审计信息的实体DTO基类PagedResultDto.cs: 分页结果DTOPageableRequestDto.cs: 分页请求DTOLimitableRequestDto.cs: 限制条数请求DTO- 各种接口定义(IEntityDto, IPagedResult等)
模块配置
SparkdoDddApplicationContractsModule.cs: 模块配置类,负责注册本地化资源
所有公共接口和类都添加了详细的XML文档注释,便于开发者理解和使用。
| Product | Versions 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.
-
net10.0
- JetBrains.Annotations (>= 2025.2.4)
- Microsoft.Extensions.Configuration (>= 10.0.5)
- Microsoft.Extensions.Configuration.CommandLine (>= 10.0.5)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.5)
- Microsoft.Extensions.Configuration.FileExtensions (>= 10.0.5)
- Microsoft.Extensions.Configuration.Json (>= 10.0.5)
- Microsoft.Extensions.Configuration.UserSecrets (>= 10.0.5)
- Microsoft.Extensions.DependencyInjection (>= 10.0.5)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.5)
- Microsoft.Extensions.DependencyModel (>= 10.0.5)
- Microsoft.Extensions.FileProviders.Composite (>= 10.0.5)
- Microsoft.Extensions.FileProviders.Embedded (>= 10.0.5)
- Microsoft.Extensions.FileProviders.Physical (>= 10.0.5)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Localization (>= 10.0.5)
- Microsoft.Extensions.Logging (>= 10.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Options (>= 10.0.5)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.5)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.5)
- Nito.AsyncEx.Context (>= 5.1.2)
- Sparkdo.Auditing.Contracts (>= 1.0.2)
- Sparkdo.Data (>= 1.0.2)
- Sparkdo.Localization (>= 1.0.2)
- System.Linq.Dynamic.Core (>= 1.7.1)
NuGet packages (8)
Showing the top 5 NuGet packages that depend on Sparkdo.Ddd.Application.Contracts:
| Package | Downloads |
|---|---|
|
Sparkdo.Ddd.Application
Sparkdo DDD应用层库,提供DDD应用服务的基础实现 |
|
|
Sparkdo.AspNetCore.Mvc.Contracts
Sparkdo ASP.NET Core MVC 契约库,提供MVC相关的数据传输对象和契约接口 |
|
|
Sparkdo.PermissionManagement.Application.Contracts
Sparkdo 权限管理应用服务契约库,提供权限管理功能的应用服务接口定义和数据传输对象 |
|
|
Sparkdo.SettingManagement.Application.Contracts
Sparkdo 设置管理应用服务契约库,提供设置管理功能的应用服务接口定义和数据传输对象 |
|
|
Sparkdo.TenantManagement.Application.Contracts
library for the Sparkdo framework |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.3-preview.1 | 65 | 5/17/2026 |
| 1.0.2 | 186 | 4/27/2026 |
| 1.0.2-preview.5 | 65 | 4/15/2026 |
| 1.0.2-preview.4 | 84 | 2/8/2026 |
| 1.0.2-preview.3 | 82 | 2/1/2026 |
| 1.0.2-preview.2 | 80 | 1/31/2026 |
| 1.0.2-preview.1 | 170 | 12/4/2025 |
| 1.0.1 | 642 | 11/27/2025 |
| 1.0.0 | 612 | 11/25/2025 |
| 1.0.0-preview.5 | 138 | 10/24/2025 |