Teast.SimpleCQRS
0.0.1
See the version list below for details.
dotnet add package Teast.SimpleCQRS --version 0.0.1
NuGet\Install-Package Teast.SimpleCQRS -Version 0.0.1
<PackageReference Include="Teast.SimpleCQRS" Version="0.0.1" />
<PackageVersion Include="Teast.SimpleCQRS" Version="0.0.1" />
<PackageReference Include="Teast.SimpleCQRS" />
paket add Teast.SimpleCQRS --version 0.0.1
#r "nuget: Teast.SimpleCQRS, 0.0.1"
#:package Teast.SimpleCQRS@0.0.1
#addin nuget:?package=Teast.SimpleCQRS&version=0.0.1
#tool nuget:?package=Teast.SimpleCQRS&version=0.0.1
Teast.SimpleCQRS
This is a simple "CQRS"/EventStore implementation that can be used to simplify the boiling plates when building such solutions.
Implementation
The idea is to have Command objects that drives changes to your entity.
One implementation is to create an CommandHandler class that can handle your Commands and that uses your Aggregate to generate an corresponding Event object.
Difference between Command and Event
The main different between this two objects is that a Command should be validated and can be rejected while an Event should never be validated and instead always be applied.
A Command that is accepted should generate an Event and the Event is the one that should be stored in your data storage and then later on read from data storage when you re-play your entity through an Aggregate
Difference between snapshot and projection
a projection should always represent latest state of your entity while a snapshot can be from any state of your entity.
IStorage
This interface is the glue between Simple.CQRS and your data storage.
When Repository needs to fetch events, snapshot, versions, etc from the data storage it will use an object that implements this interface.
Repository
This abstract class will take care of extracting changes from an existing Aggregate for saving to data storage or to create an Aggregate based of data fetched from IStorage.
Aggregate
Aggregate handles creation of events and to load events.
Event
Represents an change to your entity. All changes that you support should inherit from Event
Data
This class represents an snapshot (or projection) of your entity. It is possible to use SimpleCQRS without having an dedicated snapshot class.
| Product | Versions 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. |
-
net8.0
- No dependencies.
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-preview2 | 130 | 2/10/2026 |
| 1.0.0-preview1 | 118 | 2/10/2026 |
| 0.1.0-preview1 | 221 | 10/2/2024 |
| 0.0.1 | 473 | 8/28/2024 |
| 0.0.1-preview7 | 237 | 5/28/2024 |
| 0.0.1-preview6 | 173 | 5/28/2024 |
| 0.0.1-preview5 | 193 | 5/19/2024 |
| 0.0.1-preview4 | 200 | 5/19/2024 |
| 0.0.1-preview3 | 196 | 5/16/2024 |
| 0.0.1-preview2 | 205 | 5/7/2024 |
| 0.0.1-preview1 | 183 | 5/7/2024 |