internal void ApplyEvent(InventoryWinesView view, BottleOfWineAdded eevent) { var viewWine = view.Wines.Single(w => w.Id == eevent.Id); viewWine.Count++; viewWine.Price = Math.Max(viewWine.Price, eevent.Price); }
internal void ApplyEvent(InventoryWinesView view, FirstBottleOfWineAdded eevent) { view.Wines.Add(new ViewWine { Id = eevent.Id, Producer = eevent.Producer, Name = eevent.Name, Fruit = eevent.Fruit, Country = eevent.Country, ProductType = eevent.ProductType, Vintage = eevent.Vintage, Price = eevent.Price, Count = 1 }); }