public static CustomerDomain Create(Customer customer)
 {
     return new CustomerDomain
     {
         Id = customer.Id,
         Name = customer.Name,
         Email = customer.Email,
         Phone = customer.Phone,
         PIN = customer.PIN
     };
 }
示例#2
0
        public static CustomerDomain Create(Customer customer)
        {
            CustomerDomain customerDomain = new CustomerDomain
            {
                Id = customer.Id,
                Name = customer.Name,
                Email = customer.Email,
                Phone = customer.Phone,
                PIN = customer.PIN
            };

            if (customer.Products != null && customer.Products.Any())
            {
                var productList = new List<ProductDomain>();
                foreach (var product in customer.Products)
                {
                    productList.Add(product.CreateProductDomain(customerDomain));
                }
                customerDomain.Products = productList;
            }
            return customerDomain;
        }
示例#3
0
 public void Delete(Customer entity)
 {
 }
示例#4
0
 public void Update(Customer entity)
 {
 }
示例#5
0
 public void Add(Customer entity)
 {
 }