Esempio n. 1
0
 public void Apply(FirstBottleOfWineAdded @event)
 {
     Id       = @event.Id;
     Producer = @event.Producer;
     Name     = @event.Name;
     Fruit    = @event.Fruit;
     Country  = @event.Country;
     Bottles  = new List <Bottle>();
     Bottles.Add(new Bottle(@event.PurchaseDate, @event.Price, @event.Vintage));
 }
Esempio n. 2
0
        public InventoryWine(string vinmonopoletId, string producer, string wineName, string productType, string fruit, string country, string vintage, int price)
        {
            var @event = new FirstBottleOfWineAdded
            {
                Id           = vinmonopoletId,
                Producer     = producer,
                Name         = wineName,
                Fruit        = fruit,
                Country      = country,
                ProductType  = productType,
                Vintage      = vintage,
                Price        = price,
                PurchaseDate = DateTime.Today
            };

            Apply(@event);
            Append(@event);
        }