public CreateItemCommand(ItemId aggregateId, string description) { CommandId = Guid.NewGuid(); Description = description; AggregateId = aggregateId; }
public ItemCreated(ItemId id, string description) { Id = id; Description = description; }
public ItemLoaded(ItemId id, decimal qty) { Id = id; Qty = qty; }
private void Apply(ItemCreated evt) { this.Id = evt.Id.Id; _id = evt.Id; }
public Item(ItemId id, string description) { RaiseEvent(new ItemCreated(id, description)); }