StreamWave.EntityFramework
0.1.0
See the version list below for details.
dotnet add package StreamWave.EntityFramework --version 0.1.0
NuGet\Install-Package StreamWave.EntityFramework -Version 0.1.0
<PackageReference Include="StreamWave.EntityFramework" Version="0.1.0" />
paket add StreamWave.EntityFramework --version 0.1.0
#r "nuget: StreamWave.EntityFramework, 0.1.0"
// Install StreamWave.EntityFramework as a Cake Addin #addin nuget:?package=StreamWave.EntityFramework&version=0.1.0 // Install StreamWave.EntityFramework as a Cake Tool #tool nuget:?package=StreamWave.EntityFramework&version=0.1.0
StreamWave AggregateRoot
An aggregate root designed for a streaming environment, addressing the dual write problem by decoupling the domain model from the event stream.
Table of Contents
Features
- Easy integration
Installation
To install the package, use the following command in your .NET Core project:
dotnet add package StreamWave
Alternatively, you can add it manually to your .csproj
file:
<PackageReference Include="StreamWave" Version="0.1.0" />
Usage
Here are some basic examples of how to use the library:
Setup
Add the aggregate to the service collection
using StreamWave;
using StreamWave.EntityFramework;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddAggregate<TestState, Guid>(() => new TestState() { Id = Guid.NewGuid() })
.WithEntityFramework<TestContext, TestState, Guid>()
.WithApplier<TestEvent>((s, e) =>
{
s.Test = e.Field;
return s;
});
Use
public Task HandleAsync(IAggregate<TestState, Guid> aggregate, Guid id)
{
aggregate.LoadAsync(id);
aggregate.Apply(new TestEvent("Update"));
}
Configuration
[TODO]
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue if you encounter any bugs or have feature requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
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. |
-
net8.0
- Microsoft.EntityFrameworkCore (>= 8.0.7)
- Microsoft.EntityFrameworkCore.Abstractions (>= 8.0.7)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.7)
- StreamWave (>= 0.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.