public static CustomerDomain Create(Customer customer)
 {
     return new CustomerDomain
     {
         Id = customer.Id,
         Name = customer.Name,
         Email = customer.Email,
         Phone = customer.Phone,
         PIN = customer.PIN
     };
 }
Exemplo n.º 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;
        }
Exemplo n.º 3
0
 public void Delete(Customer entity)
 {
 }
Exemplo n.º 4
0
 public void Update(Customer entity)
 {
 }
Exemplo n.º 5
0
 public void Add(Customer entity)
 {
 }