|
| 1 | + |
| 2 | +# Samples |
| 3 | + |
| 4 | +See also fully working, real-world samples of Event Sourcing and CQRS applications in [Samples folder](https://github.com/oskardudycz/EventSourcing.NetCore/tree/main/Sample). |
| 5 | + |
| 6 | +Samples are using CQRS architecture. They're sliced based on the business modules and operations. Read more about the assumptions in ["How to slice the codebase effectively?"](https://event-driven.io/en/how_to_slice_the_codebase_effectively/?utm_source=event_sourcing_net). |
| 7 | + |
| 8 | +## [ECommerce with Marten](./ECommerce) |
| 9 | +- typical Event Sourcing and CQRS flow, |
| 10 | +- DDD using Aggregates, |
| 11 | +- microservices example, |
| 12 | +- stores events to Marten, |
| 13 | +- distributed processes coordinated by Saga ([Order Saga](./ECommerce/Orders/Orders/Orders/OrderSaga.cs)), |
| 14 | +- Kafka as a messaging platform to integrate microservices, |
| 15 | +- example of the case when some services are event-sourced ([Carts](./ECommerce/Carts), [Orders](./ECommerce/Orders), [Payments](./ECommerce/Payments)) and some are not ([Shipments](./ECommerce/Shipments) using EntityFramework as ORM) |
| 16 | + |
| 17 | +## [Simple EventSourcing with EventStoreDB](./EventStoreDB/Simple) |
| 18 | +- typical Event Sourcing and CQRS flow, |
| 19 | +- functional composition, no aggregates, just data and functions, |
| 20 | +- stores events to EventStoreDB, |
| 21 | +- Builds read models using [Subscription to `$all`](https://developers.eventstore.com/clients/grpc/subscribing-to-streams/#subscribing-to-all), |
| 22 | +- Read models are stored as Postgres tables using EntityFramework. |
| 23 | + |
| 24 | +## [ECommerce with EventStoreDB](./EventStoreDB/ECommerce) |
| 25 | +- typical Event Sourcing and CQRS flow, |
| 26 | +- DDD using Aggregates, |
| 27 | +- stores events to EventStoreDB, |
| 28 | +- Builds read models using [Subscription to `$all`](https://developers.eventstore.com/clients/grpc/subscribing-to-streams/#subscribing-to-all). |
| 29 | +- Read models are stored as Marten documents. |
| 30 | + |
| 31 | +## [Warehouse](./Warehouse) |
| 32 | +- simplest CQRS flow using .NET 5 Endpoints, |
| 33 | +- example of how and where to use C# Records, Nullable Reference Types, etc, |
| 34 | +- No Event Sourcing! Using Entity Framework to show that CQRS is not bounded to Event Sourcing or any type of storage, |
| 35 | +- No Aggregates! CQRS do not need DDD. Business logic can be handled in handlers. |
| 36 | + |
| 37 | +## [Meetings Management with Marten](./MeetingsManagement/) |
| 38 | +- typical Event Sourcing and CQRS flow, |
| 39 | +- DDD using Aggregates, |
| 40 | +- microservices example, |
| 41 | +- stores events to Marten, |
| 42 | +- Kafka as a messaging platform to integrate microservices, |
| 43 | +- read models handled in separate microservice and stored to other database (ElasticSearch) |
| 44 | + |
| 45 | +## [Cinema Tickets Reservations with Marten](./Tickets/) |
| 46 | +- typical Event Sourcing and CQRS flow, |
| 47 | +- DDD using Aggregates, |
| 48 | +- stores events to Marten. |
| 49 | + |
| 50 | +## [SmartHome IoT with Marten](./AsyncProjections/) |
| 51 | +- typical Event Sourcing and CQRS flow, |
| 52 | +- DDD using Aggregates, |
| 53 | +- stores events to Marten, |
| 54 | +- asynchronous projections rebuild using AsynDaemon feature. |
0 commit comments