Skip to content

Commit

Permalink
Updated EventStoreDB sample README
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardudycz committed Jul 2, 2021
1 parent 36077a1 commit 46164d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions EventSourcing.NetCore.sln
Expand Up @@ -188,6 +188,9 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EventStoreDB", "EventStoreDB", "{9C5C1CB3-B8CD-4CEE-A5F2-5983770C60BB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ECommerce", "ECommerce", "{8B6B9E43-F3F2-4F9E-A89C-E7B311B72A8D}"
ProjectSection(SolutionItems) = preProject
Sample\EventStoreDB\ECommerce\README.md = Sample\EventStoreDB\ECommerce\README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Carts", "Carts", "{923B37CD-DBD5-488D-B2B9-000C91F6B861}"
EndProject
Expand Down
10 changes: 7 additions & 3 deletions Sample/EventStoreDB/ECommerce/README.md
Expand Up @@ -40,6 +40,7 @@ It uses:
- Added [EventStoreDBRepository](https://github.com/oskardudycz/EventSourcing.NetCore/blob/main/Core.EventStoreDB/Repository/EventStoreDBRepository.cs) repository to load and store aggregate state,
- Added separate [IProjection](https://github.com/oskardudycz/EventSourcing.NetCore/blob/main/Core/Projections/IProjection.cs) interface to handle the same way stream aggregation and materialised projections,
- Thanks to that added dedicated [AggregateStream](https://github.com/oskardudycz/EventSourcing.NetCore/blob/main/Core.EventStoreDB/Events/AggregateStreamExtensions.cs#L12) method for stream aggregation
- See [sample Aggregate](./Carts/Carts/Carts/Cart.cs)

## Read Model
- Read models are rebuilt with eventual consistency using subscribe to all EventStoreDB feature,
Expand All @@ -49,13 +50,16 @@ It uses:
- Added [MartenExternalProjection](https://github.com/oskardudycz/EventSourcing.NetCore/pull/49/files#diff-6d8dadf8ab81a9441836a5403632ef3616a1dc42788b5feae1c56a4f2321d4eeR12) as a sample how to project with [`left-fold`](https://en.wikipedia.org/wiki/Fold_(higher-order_function)) into external storage. Another (e.g. ElasticSearch, EntityFramework) can be implemented the same way.

## Tests
- Added sample of unit testing in `Carts.Tests`,
- Added sample of integration testing in `Carts.Tests.Api`
- Added sample of unit testing in [`Carts.Tests`](./Carts/Carts.Tests):
- [Aggregate unit tests](./Carts/Carts.Tests/Carts/InitCartTests.cs)
- [Command handler unit tests](./Carts/Carts.Tests/Carts/CommandHandlers/InitCardCommandHandlerTests.cs)
- Added sample of integration testing in [`Carts.Api.Tests`](./Carts/Carts.Api.Tests)
- [API integration tests](./Carts/Carts.Api.Tests/Carts/InitCartTests.cs)

## Other
- Added [EventTypeMapper](https://github.com/oskardudycz/EventSourcing.NetCore/blob/main/Core/Events/EventTypeMapper.cs) class to allow both convention-based mapping (by the .NET type name) and custom to handle event versioning,
- Added [StreamNameMapper](https://github.com/oskardudycz/EventSourcing.NetCore/blob/main/Core/Events/StreamNameMapper.cs) class for convention-based id (and optional tenant) mapping based on the stream type and module,
- IoC registration helpers - https://github.com/oskardudycz/EventSourcing.NetCore/blob/main/Core.EventStoreDB/Config.cs,
- IoC [registration helpers for EventStoreDB configuration](https://github.com/oskardudycz/EventSourcing.NetCore/blob/main/Core.EventStoreDB/Config.cs),


## Trivia
Expand Down

0 comments on commit 46164d3

Please sign in to comment.