Beispiel #1
0
 public void Handle(ShippingMethodInsertedEvent @event)
 {
     AddedBy     = @event.AddedBy;
     AddedDate   = @event.AddedDate;
     Id          = @event.AggregateId;
     Description = @event.Description;
     Price       = @event.Price;
     Title       = @event.Title;
 }
Beispiel #2
0
        public ShippingMethod(
            Guid id,
            DateTime addedDate,
            string addedBy,
            string title,
            decimal price,
            string description)
        {
            var @event = new ShippingMethodInsertedEvent
            {
                AggregateId = id,
                AddedDate   = addedDate,
                AddedBy     = addedBy,
                Title       = title,
                Price       = price,
                Description = description
            };

            ApplyChange(@event);
        }