Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Projections: Building Read Models with Inline, Async, and Live Projections
A projection is a function that turns events into a read model shaped by a specific question; Inline runs in the same transaction as the events, Async runs in the background with the daemon, and Live is never stored. A stock badge, a monthly stock movement report, and reservations waiting to ship from the Bookstore stock ledger; checkpoints, changing a projection and rebuilding it, dead letters, and a failed rebuild emptying a read model.
Projection with LINQ: Select, SelectMany and Anonymous Types
One-to-one projection with Select and one-to-many with SelectMany; mapping to DTOs, keeping parent data with a result selector, the Cartesian product, the equality and with rules of anonymous types, and tuple versus record outside a method.