예제 #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);
        }
예제 #2
0
 public void Apply(BottleOfWineAdded @event)
 {
     Bottles.Add(new Bottle(@event.PurchaseDate, @event.Price, @event.Vintage));
 }