public OrderItemProcessedEventArgs(Customer customer, OrderLineItemData orderLineItemData, IStoreRepository storeRepository) { Customer = customer; OrderLineItemData = orderLineItemData; MessageText = string.Empty; StoreRepository = storeRepository; }
public OrderItemProcessedEventArgs( Customer customer, OrderLineItemData orderLineItemData, string message) { this.Customer = customer; this.OrderLineItemData = orderLineItemData; this.Message = message; }
public int Insert(int orderId, DateTime?shipDate) { var data = new OrderLineItemData { OrderId = orderId }; if (shipDate.HasValue) { data.ShipDate = shipDate.Value; } dataContext.OrderLineItems.Add(data); var count = dataContext.SaveChanges(); if (count == 0) { throw new InvalidOperationException("OrderLineItemDal.Insert"); } return(data.Id); }
public OrderItemProcessedEventArgs(Customer customer, OrderLineItemData orderLineItemData) { Customer = customer; OrderLineItemData = orderLineItemData; }