private void OnProductDefined(ProductDefined @event) { Console.WriteLine("ProductReadModelEventHandler: Event \"{0}\" with Id \"{1}\"", @event.GetType().Name, @event.Id); _productsReadModel.Add(new ProductInStock { Id = @event.Id, Name = @event.Name, Quantity = 0 }); }
protected bool Equals(ProductDefined other) => base.Equals(other) && Description == other.Description && Name == other.Name && OccurredOn.Equals(other.OccurredOn) && Price == other.Price && Version == other.Version;
public void WhenProductDefined(ProductDefined @event) { Name = @event.Name; Description = @event.Description; Price = @event.Price; }