Skip to content

Releases: oskardudycz/EventSourcing.NetCore

Added EventStoreDB E-Commerce initial samples

03 Jul 08:01
Compare
Choose a tag to compare

E-Commerce sample of Event Sourcing with EvenStoreDB

Sample is showing the typical flow of the Event Sourcing app with EventStoreDB.

Prerequisities

  1. Install git - https://git-scm.com/downloads.
  2. Install .NET Core 5.0 - https://dotnet.microsoft.com/download/dotnet/5.0.
  3. Install Visual Studio 2019, Rider or VSCode.
  4. Install docker - https://docs.docker.com/docker-for-windows/install/.
  5. Open ECommerce.sln solution.

Running

  1. Go to docker and run: docker-compose up.
  2. Wait until all dockers got are downloaded and running.
  3. You should automatically get:
    • Postgres DB running
    • PG Admin - IDE for postgres. Available at: http://localhost:5050.
      • Login: admin@pgadmin.org, Password: admin
      • To connect to server Use host: postgres, user: postgres, password: Password12!
    • EventStoreDB UI: http://localhost:2113/
  4. Open, build and run ECommerce.sln solution.

Overview

It uses:

  • CQRS with MediatR,
  • Stores events from Aggregate method results to EventStoreDB,
  • Builds read models using Subscription to $all.
  • Read models are stored as Marten documents.
  • App has Swagger and predefined docker-compose to run and play with samples.

Write Model

  • Most of the write model infrastructure was reused from other samples,
  • Added new project Core.EventStoreDB for specific EventStoreDB code,
  • Added EventStoreDBRepository repository to load and store aggregate state,
  • Added separate IProjection interface to handle the same way stream aggregation and materialised projections,
  • Thanks to that added dedicated AggregateStream method for stream aggregation
  • See sample Aggregate

Read Model

Tests

Other

Trivia

  1. Docker useful commands
    • docker-compose up - start dockers
    • docker-compose kill - to stop running dockers.
    • docker-compose down -v - to clean stopped dockers.
    • docker ps - for showing running dockers
    • docker ps -a - to show all dockers (also stopped)

Updated to Marten v4 alpha

13 Mar 20:19
Compare
Choose a tag to compare

Updated to Marten v4 alpha with revolutionary changes to Event Sourcing projections API.

More details in Pull Request: #38

See also:

Updated to .NET 5

06 Dec 14:09
Compare
Choose a tag to compare
  • Updated projects to .NET 5 from .NET Core 3.1
  • Updated packages to latest versions
  • Changed the private class into public to workaround new changes in Marten related to codegen
  • Renamed test class Task into Issue to workaround Marten issue JasperFx/marten#1647
  • Needed to make Aggregates classes public because of current Marten v4 alpha codegen limitation (JasperFx/marten#1655), and .NET limitations dotnet/runtime#12454.

See more in: #32

Added Event Sourced Aggregates implementation for e-commerce sample for Practical Event Sourcing workshop

07 Oct 10:14
Compare
Choose a tag to compare

Added the initial set of commands and events for e-commerce sample for Practical Event Sourcing workshop

06 Oct 18:17
Compare
Choose a tag to compare

Unified Core architecture components

05 Oct 21:15
cc5415d
Compare
Choose a tag to compare

Unified multiple Core architecture components into projects that are reused acrosss all samples.

Upgraded to NetCore 2.1

07 Sep 11:22
a579edb
Compare
Choose a tag to compare
#12 - Unification EventStore usage (#14)

* Upgraded to .NET core 2.1

* Downgraded version of EntityFramework, because it uses newer version of Npgsql because it collides with Marten

* Unified EventStore usage

* Ignored Pending events for Client entity framework entity

Upgraded versions of MediatR to 4

29 Dec 21:26
fcdddce
Compare
Choose a tag to compare

Upgraded to newest versions of packages. Breaking changes after upgrade to MediatR 4. Now only Asynchronous handlers are available. Synchronous were removed, and asynchronous were renamed to "regular" eg. IAsyncCommandHandler to AsyncCommandHandler

Added Sample of CQRS with Entity Framework

21 Oct 16:30
Compare
Choose a tag to compare

Upgraded versions of Marten to 2 and MediatR to 3

01 Aug 16:25
Compare
Choose a tag to compare