Coder Social home page Coder Social logo

practicalcqrs's Introduction

Practical CQRS

Small CQRS/ES project created from scratch for demo purposes, based on .NET Core 3.1, LocalDb, EventStore and TacticalDDD package version 1.26.

TacticalDDD is used only for ValueObject, Entity and AggregateRoot definitions to avoid project bloat.

https://www.nuget.org/packages/TacticalDDD/1.0.26

How to start

First, make sure to run DbMigration project. This should create all relevant databases. This is needed only the first time project is run. After that it is no longer required.

After that, 2 project can be run at the same time: Hosts/RestAPI Hosts/ProjectionHost

Once RestAPI is running it will navigate to set IISExpress Route and invoke swagger.

Swagger is pretty self explanatory, but in short here we can create new person(after person is created, ID is returned, use this ID to fetch given person) or we can update persons address.

In both cases event is stored into EventStore and eventually is projected into ReadModel( hence eventual consistency ).

ProjectionHost will pool event store for changes each second and apply required events to project them to readmodel if needed.

Tests

I've tried to include test for each layer.

TODO: Add repository tests

practicalcqrs's People

Contributors

bolicd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.