Ejemplo n.º 1
0
        public void AddBottle(string vintage, int price)
        {
            var @event = new BottleOfWineAdded
            {
                Id           = Id,
                Vintage      = vintage,
                Price        = price,
                PurchaseDate = DateTime.Today
            };

            Apply(@event);
            Append(@event);
        }
Ejemplo n.º 2
0
 public void Apply(BottleOfWineAdded @event)
 {
     Bottles.Add(new Bottle(@event.PurchaseDate, @event.Price, @event.Vintage));
 }