public static OrderLegacy Make(IOrder order) { var order_legacy = new OrderLegacy(); order_legacy.OrderId = order.OrderId; order_legacy.CustomerId = order.CustomerId; order_legacy.ShipPostalCode = order.ShipPostalCode; return(order_legacy); }
public static CustomerLegacy Make(ICustomer customer) { var customer_legacy = new CustomerLegacy(); customer_legacy.Id = customer.Id; customer_legacy.CompanyName = customer.CompanyName; if (customer.Orders != null && customer.Orders.Count > 0) { customer_legacy.Orders = new List <IOrder>(); foreach (var order in customer.Orders) { customer_legacy.Orders.Add(OrderLegacy.Make(order)); } } return(customer_legacy); }
public static OrderLegacy Make(IOrder order) { var order_legacy = new OrderLegacy(); order_legacy.OrderId = order.OrderId; order_legacy.CustomerId = order.CustomerId; order_legacy.ShipPostalCode = order.ShipPostalCode; return order_legacy; }