Exemple #1
0
        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
            });
        }
Exemple #2
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;
Exemple #3
0
 public void WhenProductDefined(ProductDefined @event)
 {
     Name        = @event.Name;
     Description = @event.Description;
     Price       = @event.Price;
 }