public MyAggregate Apply(MyAggregate aggregate, DEvent @event) { return(new MyAggregate { ACount = aggregate.ACount, BCount = aggregate.BCount, CCount = aggregate.CCount, DCount = aggregate.DCount + 1, Id = aggregate.Id }); }
public void Apply(MyAggregate aggregate, DEvent @event) { aggregate.DCount++; }