Contents tagged with CQRS

  • CQRS in in C# most trivial possible example

    Hello everybody,

    today I want to make compendium of CQRS for very simple case.

    So, at one of the projects I seen following way of implementing code:

    public class WriteModel

    {

    //common properties

    public int SomeEntity {get;set; } // ID of some entity

    }

    public class ReadModel : WriteModel

    {

    public string AdditionalProperty {get;set; }

    }

    and that way of implementing it was proudly named CQRS. To be honest I wasn't very agreeable on that part, so I decided to hear opinions of other people, not only mine understanding of what I read in book.

    And I'd like to save one of the comments not only at stackoverflow, but also at my web site.

    So, what's wrong with … more

  • CQRS in .Net

    Hello everybody,

    for now I want to make snapshot or dump of my brain about CQRS, so beware from reading of it, because it can be confusing.

    Very simple explanation of CQRS

    As usually if you see some kind of application, you can expect that what you see on the screen, you'll see it in db. It means if you see on screen Order, and order details, you can expect to see in database tables order and OrderDetails, or “one to one” relation between screen and DB.

    Like this:

    But with CQRS following changes can be applied:

    Instead of two tables ( order and order details ), you will see three tables. Now make a pause and tell your assumption what can be their names? As one of the ways it … more