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 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; }