JuergenGutsch / blog

Personal blog about web development based on .NET and .NET Core
https://asp.net-hacker.rocks/
Other
31 stars 17 forks source link

A small library to support the CQS pattern. #61

Open JuergenGutsch opened 6 years ago

JuergenGutsch commented 6 years ago

Written on 12.12.2016 08:35:11

URL: http://asp.net-hacker.rocks/2016/12/12/a-pritty-simple-cqs-library.html

JuergenGutsch commented 6 years ago

Comment written by Sam Jost on 14.12.2016 16:52:02

Interesting variation of the store/repository/storage-pattern.
One thing I dont understand:
In your very first example, saving something and writing a log about it: how do you put these two (or more) things in one transaction, so they will be either all be stored or be rolled back (thinking SQL Transactions)?

JuergenGutsch commented 6 years ago

Comment written by Jürgen Gutsch on 09.02.2017 05:51:25

I did't consider transactions here, but you could handle it inside the CommandDispatcher automatically, by rolling back on any exception.