public void Handle(ShippingMethodInsertedEvent @event) { AddedBy = @event.AddedBy; AddedDate = @event.AddedDate; Id = @event.AggregateId; Description = @event.Description; Price = @event.Price; Title = @event.Title; }
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); }