Skip to content

Commit

Permalink
Updated README.md description of Simple EventStoreDB sample
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardudycz committed Nov 2, 2021
1 parent 62f24a0 commit 5d74226
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using ECommerce.Core.Serialisation;
using ECommerce.Core.Subscriptions;
using ECommerce.Core.Subscriptions;
using EventStore.Client;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand Down
4 changes: 2 additions & 2 deletions Sample/EventStoreDB/Simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ It uses:
- Example [ProductItemsList](./ECommerce/ShoppingCarts/ProductItems/ProductItemsList.cs) value object wrapping the list of product items in the shopping carts. It simplified the main state apply logic and offloaded some of the invariants checks.
- All commands by convention should be created using the [factory method](./ECommerce/ShoppingCarts/AddingProductItem/AddProductItemToShoppingCart.cs#L13) to enforce the types,
- Command handlers are defined as static methods in the same file as command definition. Usually, they change together. They are pure functions that take command and/or state and create new events based on the business logic. See sample [Adding Product Item to ShoppingCart](./ECommerce/ShoppingCarts/AddingProductItem/AddProductItemToShoppingCart.cs#L25). This example also shows that you can inject external services to handlers if needed.
- [Added syntax for self-documenting command handlers registration](./ECommerce/ShoppingCarts/Configuration.cs#L22). See the details of registration in [CommandHandlerExtensions](./ECommerce.Core/Commands/CommandHandler.cs). They differentiate case when [a new entity/stream is created](./Ecommerce.Core/Commands/CommandHandler.cs#L11) from the [update case](./Ecommerce.CoreECommerce.Core/Commands/CommandHandler.cs#L25). Update has to support optimistic concurrency.
- Added simple [EventStoreDBRepository](./ECommerce.Core/Entities/EventStoreDBRepository.cs) repository to load entity state and store event created by business logic,
- [Added syntax for self-documenting command handlers registration](./ECommerce/ShoppingCarts/Configuration.cs#L22). See the details of registration in [CommandHandlerExtensions](./ECommerce.Core/Commands/CommandHandler.cs). They differentiate case when [a new entity/stream is created](./ECommerce.Core/Commands/CommandHandler.cs#L12) from the [update case](./ECommerce.CoreECommerce.Core/Commands/CommandHandler.cs#L26). Update has to support optimistic concurrency. Added also [Command Handlers Builder](./ECommerce.CoreECommerce.Core/Commands/CommandHandler.cs#102) for simplifying the registrations.
- Added simple [EventStoreDB extensions](./ECommerce.Core/EventStoreDB/EventStoreDBExtensions.cs) repository to load entity state and store event created by business logic,
- [New, simplified Core infrastructure](./ECommerce.Core/)

## Read Model
Expand Down

0 comments on commit 5d74226

Please sign in to comment.