예제 #1
0
        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);
        }
예제 #2
0
파일: Entities.cs 프로젝트: rhutchison/Nemo
 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;
 }