HerrGeneral.WriteSide 1.7.0

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

HerrGeneral.WriteSide

Overview

(Optional)

Interfaces and attributes for Herr General WriteSide:

  • ICommandHandler and IEventHandler for strong-typed handler mapping without reflection.
  • [LockKey<TAggregate>] and IKeyedCommand for command concurrency control and partition-based locking.

Pros: no reflection to resolve handlers, compile-time safety for concurrency keys
Cons: adds a dependency on HerrGeneral in the write model

NuGet Packages

dotnet add package HerrGeneral.WriteSide

Command Concurrency & Locking

HerrGeneral provides partition-based concurrency control to serialize commands targeting the same entity while executing independent commands concurrently.

Use [LockKey<TAggregate>] on the identifier property of your command. This is the simplest, most concise, and type-safe approach for positional records:

using HerrGeneral.WriteSide;

public record CancelOrder(
    [property: LockKey<Order>] Guid OrderId, 
    string Reason
);

You can also use the non-generic [LockKey(typeof(Order))]:

public record UpdateAddress(
    [property: LockKey(typeof(Order))] Guid OrderId, 
    string Street, 
    string City
);

Benefits:

  • Zero boilerplate: Single attribute directly on the record parameter.
  • Automatic key qualification: The lock is scoped to (typeof(Order), OrderId), preventing lock collisions between different aggregate types with identical IDs.

2. Interface-Based Locking (Advanced / Extension Point)

For complex, dynamic, or composite keys (e.g., multi-tenancy), implement IKeyedCommand:

using HerrGeneral.WriteSide;

public record TransferFunds(
    Guid TenantId, 
    Guid SourceAccountId, 
    decimal Amount
) : IKeyedCommand
{
    // Composite lock key
    public object Key => (TenantId, typeof(Account), SourceAccountId);
}
Product 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.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on HerrGeneral.WriteSide:

Package Downloads
HerrGeneral.Core

Core mediator, pipeline, and concurrency framework for HerrGeneral CQRS library

HerrGeneral.WriteSide.DDD

Write-side DDD aggregate repositories and command dispatching for HerrGeneral

HerrGeneral.Core.DDD

Domain-Driven Design (DDD) aggregate lifecycle and dynamic handler integration for HerrGeneral

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.7.0 121 10/7/2026
1.6.0 125 10/5/2026
1.5.1-alpha.0.30 79 10/5/2026
1.3.0 760 12/1/2025
1.2.1-alpha.0.2 436 11/30/2025
1.0.1-alpha.0.3 395 11/20/2025
0.1.26-rc 360 11/11/2025
0.1.25-rc 272 9/25/2025
0.1.24-rc 219 9/12/2025
0.1.23-rc 259 9/11/2025
0.1.22-rc 256 9/11/2025
0.1.21-rc 183 8/23/2025
0.1.20-rc 336 8/7/2025
0.1.19-rc 338 8/6/2025
0.1.18-rc 166 8/1/2025
0.1.17-rc 241 7/13/2025
0.1.16-rc 196 7/4/2025
0.1.15-rc 261 7/1/2025
0.1.14-rc 218 6/28/2025
0.1.13-rc 257 11/12/2024
Loading failed