.NET: Practical Event Sourcing with Marten
summary
Shows a concrete .NET implementation that uses Marten on Postgres to store immutable events as a JSONB event table (id, type, stream id, version, timestamp, data) and to publish snapshots as snapshot documents for fast reads. Builds a cinema reservation example with aggregates that enqueue uncommitted events, append them atomically to the store, and project multiple read models via CQRS and projections. Demonstrates strong consistency, time travel by replaying events, and simple rebuilds of projections from the log.
AI-written summary · about
chapters (13)
- 0:00Introduction and speaker intro
- 1:16What is event sourcing
- 7:05Event storming and business events
- 9:12Technical event structure
- 15:54Marten and its origins
- 17:23Entities vs aggregates in event sourcing
- 18:29Code walkthrough: Reservation aggregate
- 28:30Storing and retrieving events
- 31:24Document session and CQRS
- 32:45Performance and snapshots
- 35:57Projections and their power
- 41:00Time travel and debugging
- 42:26Summary and next steps
related talks
57mEventuous Event Sourcing with .NET
52mYou don't need an Event Sourcing framework. Or do you?
45mBuilding a C# Application from Scratch with CleanArchitecture, CQRS and Event Sourcing
45mUsing modern .NET technologies to decompose a monolith into micro-services
47m.NET Blub: Frameworks beyond Microsoft
50mActors can rule your DDD world
07h 42mDay 2: Event-Driven Systems & GenAI with Aspire, F#, dotMemory, and More
39mActors can rule your DDD world
