Inheritance, commands and event sourcing
- by Arthis
In order not to redo things several times I wanted to factorize common stuff. For Instance, let's say we have a cow and a horse. The cow produces milk, the horse runs fast, but both eat grass.
public class Herbivorous
{
public void EatGrass(int quantity)
{
var evt= Build.GrassEaten
.WithQuantity(quantity);
…