An aggregate that persists as events
You want aggregate-based event sourcing without hand-writing the event stream, snapshot, and transaction plumbing.
[Aggregate]
public partial class OrderAggregate : AggregateBase
{
public string CustomerId { get; private set; } = default!;
public decimal Total { get; private set; }
[Event]
public partial void CreateOrder(string customerId);
[Event]
public partial void AddLineItem(string productId, string productName, int quantity, decimal unitPrice);
} What you get: The source generator produces the aggregate plumbing; provider packages add stores for SQL Server, PostgreSQL, MongoDB, Azure Storage, Cosmos DB, or in-memory.
One [Aggregate] declaration, and switching storage means swapping a provider package rather than rewriting the domain.
Read the guide →