Cike.Cqrs 1.0.60028

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

Cike.Cqrs

CQRS 用例基类。没有独立 Dispatcher——Command/Query 的派发复用本地事件总线(ILocalEventBus.PublishAsync)实现。

提供的能力

类型 定义
Command : Event, ICommand 无返回值用例;需要回传数据时加可写属性(如 public long Id { get; set; },handler 填充后调用方读取)
Query<TResult> : Event<TResult>, IQuery<TResult> 有返回值用例;handler 给 query.Result 赋值
ICommand / IQuery<TResult> 标记接口(继承 IEvent)

典型写法:

public record AddTodoCommand(AddTodoDto Dto) : Command { public long Id { get; set; } }
public record GetTodoQuery(long Id) : Query<TodoDetailDto>;

// Handler(任意类 + 方法标注)
[LocalEventHandler]
public async Task AddAsync(AddTodoCommand command, CancellationToken ct = default) { ... }

// Service 层派发
var command = new AddTodoCommand(dto);
await localEventBus.PublishAsync(command, ct);
return TypedResults.Ok(command.Id);

【陷阱】不继承 Command / Query<TResult> 的类型不是 IEvent,发布时被静默忽略。

模块信息

  • 模块类:CikeCqrsModule(无逻辑)
  • 直接依赖:CikeEventBusModule

更多

完整 Handler 规则与全链路 Recipe:AI 开发指南 第 5、9 节。

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.60028 93 9/19/2026
1.0.60026 86 9/28/2026
1.0.60025 90 9/19/2026
1.0.60024 89 9/19/2026
1.0.60023 102 9/16/2026
1.0.60022 97 9/13/2026
1.0.60021 92 9/12/2026
1.0.60020 97 9/10/2026
1.0.60019 108 8/28/2026
1.0.60018 122 7/29/2026
1.0.60017 115 7/26/2026
1.0.60016 111 7/26/2026
1.0.60015 114 7/26/2026
1.0.60014 214 10/8/2025
1.0.60013 208 10/8/2025
1.0.60012 181 10/3/2025
1.0.60011 194 1/31/2025
1.0.60010 157 1/23/2025
1.0.60009 140 1/23/2025
1.0.9 78 9/28/2026
Loading failed