Arbiter.CommandQuery.EntityFramework
1.0.0-beta.3
See the version list below for details.
dotnet add package Arbiter.CommandQuery.EntityFramework --version 1.0.0-beta.3
NuGet\Install-Package Arbiter.CommandQuery.EntityFramework -Version 1.0.0-beta.3
<PackageReference Include="Arbiter.CommandQuery.EntityFramework" Version="1.0.0-beta.3" />
<PackageVersion Include="Arbiter.CommandQuery.EntityFramework" Version="1.0.0-beta.3" />
<PackageReference Include="Arbiter.CommandQuery.EntityFramework" />
paket add Arbiter.CommandQuery.EntityFramework --version 1.0.0-beta.3
#r "nuget: Arbiter.CommandQuery.EntityFramework, 1.0.0-beta.3"
#addin nuget:?package=Arbiter.CommandQuery.EntityFramework&version=1.0.0-beta.3&prerelease
#tool nuget:?package=Arbiter.CommandQuery.EntityFramework&version=1.0.0-beta.3&prerelease
Arbiter
Mediator pattern and Command Query Responsibility Segregation (CQRS) implementation in .NET
Library | Package | Description |
---|---|---|
Arbiter.Mediation | Lightweight and extensible implementation of the Mediator pattern | |
Arbiter.CommandQuery | Base package for Commands, Queries and Behaviours | |
Arbiter.CommandQuery.EntityFramework | Entity Framework Core handlers for the base Commands and Queries | |
Arbiter.CommandQuery.MongoDB | Mongo DB handlers for the base Commands and Queries | |
Arbiter.CommandQuery.Endpoints | Minimal API endpoints for base Commands and Queries |
Arbiter.Mediation
A lightweight and extensible implementation of the Mediator pattern for .NET applications, designed for clean, modular architectures like Vertical Slice Architecture and CQRS.
Mediation Installation
The Arbiter Mediation library is available on nuget.org via package name Arbiter.Mediation
.
To install Arbiter Mediation, run the following command in the Package Manager Console
Install-Package Arbiter.Mediation
OR
dotnet add package Arbiter.Mediation
Mediation Features
- Request with response handling using
IRequest<TResponse>
andIRequestHandler<TRequest, TResponse>
- Notifications (Events) using
INotification
andINotificationHandler<TNotification>
- Pipeline Behaviors, like middleware, using
IPipelineBehavior<TRequest, TResponse>
- Dependence Injection based
Define Request
public class Ping : IRequest<Pong>
{
public string? Message { get; set; }
}
Implement Handler
public class PingHandler : IRequestHandler<Ping, Pong>
{
public async ValueTask<Pong> Handle(
Ping request,
CancellationToken cancellationToken = default)
{
// Simulate some work
await Task.Delay(100, cancellationToken);
return new Pong { Message = $"{request.Message} Pong" };
}
}
Define Pipeline Behavior
public class PingBehavior : IPipelineBehavior<Ping, Pong>
{
public async ValueTask<Pong> Handle(
Ping request,
RequestHandlerDelegate<Pong> next,
CancellationToken cancellationToken = default)
{
// Do something before the request is handled
var response = await next(cancellationToken);
// Do something after the request is handled
return response;
}
}
Register Handlers
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
// Register Arbiter services
services.AddArbiter();
// Register handlers
services.TryAddTransient<IRequestHandler<Ping, Pong>, PingHandler>();
// Optionally register pipeline behaviors, supports multiple behaviors
services.AddTransient<IPipelineBehavior<Ping, Pong>, PingBehavior>();
}
}
Send Request
public class PingController : ControllerBase
{
private readonly IMediator _mediator;
public PingController(IMediator mediator)
{
_mediator = mediator;
}
[HttpGet]
public async Task<IActionResult> Get(
string? message = null,
CancellationToken? cancellationToken = default)
{
var request = new Ping { Message = message };
var response = await _mediator.Send<Ping, Pong>(request, cancellationToken);
return Ok(response);
}
}
Arbiter.CommandQuery
Command Query Responsibility Segregation (CQRS) framework based on mediator pattern
CommandQuery Installation
The Arbiter Command Query library is available on nuget.org via package name Arbiter.CommandQuery
.
To install Arbiter Command Query, run the following command in the Package Manager Console
Install-Package Arbiter.CommandQuery
OR
dotnet add package Arbiter.CommandQuery
CommandQuery Features
- Base commands and queries for common CRUD operations
- Generics base handlers for implementing common CRUD operations
- Common behaviors for audit, caching, soft delete, multi-tenant
- View model to data modal mapping
- Entity Framework Core handlers for common CRUD operations
- MongoDB handlers for common CRUD operations
Arbiter.CommandQuery.EntityFramework
Entity Framework Core handlers for the base Commands and Queries
EntityFramework Installation
Install-Package Arbiter.CommandQuery.EntityFramework
OR
dotnet add package Arbiter.CommandQuery.EntityFramework
Arbiter.CommandQuery.MongoDB
Mongo DB handlers for the base Commands and Queries
MongoDB Installation
Install-Package Arbiter.CommandQuery.MongoDB
OR
dotnet add package Arbiter.CommandQuery.MongoDB
Arbiter.CommandQuery.Endpoints
Minimal API endpoints for base Commands and Queries
Endpoints Installation
Install-Package Arbiter.CommandQuery.Endpoints
OR
dotnet add package Arbiter.CommandQuery.Endpoints
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 is compatible. 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. |
-
net8.0
- Arbiter.CommandQuery (>= 1.0.0-beta.3)
- Microsoft.EntityFrameworkCore (>= 9.0.4)
-
net9.0
- Arbiter.CommandQuery (>= 1.0.0-beta.3)
- Microsoft.EntityFrameworkCore (>= 9.0.4)
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 | 109 | 5/6/2025 |
1.0.0-beta.7 | 106 | 5/1/2025 |
1.0.0-beta.6 | 113 | 4/29/2025 |
1.0.0-beta.5 | 111 | 4/29/2025 |
1.0.0-beta.4 | 113 | 4/29/2025 |
1.0.0-beta.3 | 121 | 4/23/2025 |