Example #1
0
        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);
        }
Example #2
0
 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;
 }
Example #3
0
 public void Handle(OrderInsertedEvent message)
 {
     _orders.Add(new OrderVM(message.Order, _mainVM, _ordersService));
 }