public Order( Guid id, DateTime addedDate, string addedBy, Guid statusId, string shippingMethod, decimal subTotal, decimal shipping, string shippingFirstName, string shippingLastName, string shippingStreet, string shippingPostalCode, string shippingCity, string shippingState, string shippingCountry, string customerEmail, string customerPhone, string customerFax, string transactionId, DateTime?shippedDate, string trackingId) { var @event = new OrderInsertedEvent { AggregateId = id, AddedDate = addedDate, AddedBy = addedBy, StatusId = statusId, ShippingMethod = shippingMethod, SubTotal = subTotal, Shipping = shipping, ShippingFirstName = shippingFirstName, ShippingLastName = shippingLastName, ShippingStreet = shippingStreet, ShippingPostalCode = shippingPostalCode, ShippingCity = shippingCity, ShippingState = shippingState, ShippingCountry = shippingCountry, CustomerEmail = customerEmail, CustomerPhone = customerPhone, CustomerFax = customerFax, TransactionId = transactionId, ShippedDate = shippedDate, TrackingId = trackingId }; ApplyChange(@event); }
public void Handle(OrderInsertedEvent @event) { Id = @event.AggregateId; CustomerEmail = @event.CustomerEmail; CustomerFax = @event.CustomerFax; CustomerPhone = @event.CustomerPhone; ShippedDate = @event.ShippedDate; Shipping = @event.Shipping; ShippingCity = @event.ShippingCity; ShippingCountry = @event.ShippingCountry; ShippingFirstName = @event.ShippingFirstName; ShippingLastName = @event.ShippingLastName; ShippingMethod = @event.ShippingMethod; ShippingPostalCode = @event.ShippingPostalCode; ShippingState = @event.ShippingState; ShippingStreet = @event.ShippingStreet; StatusId = @event.StatusId; SubTotal = @event.SubTotal; TrackingId = @event.TrackingId; TransactionId = @event.TransactionId; }
public void Handle(OrderInsertedEvent message) { _orders.Add(new OrderVM(message.Order, _mainVM, _ordersService)); }