Exemplo n.º 1
0
        Contracts.Customer ICustomerService.Create(Contracts.Customer customer)
        {
            Data.Customer customerEntity = MapCustomer(customer);
            var           customerResult = _customerRepositary.Create(customerEntity);

            customer.CustomerId = customerResult.CustomerId;
            return(customer);
        }
Exemplo n.º 2
0
 private Data.Customer MapCustomer(Contracts.Customer customer)
 {
     Data.Customer customerEntity = new Data.Customer()
     {
         CustomerId  = customer.CustomerId,
         Email       = customer.Email,
         FirstName   = customer.FirstName,
         LastName    = customer.LastName,
         PhoneNumber = customer.PhoneNumber,
         Status      = customer.Status
     };
     return(customerEntity);
 }
Exemplo n.º 3
0
 void ICustomerService.Update(Contracts.Customer customer)
 {
     Data.Customer customerEntity = MapCustomer(customer);
     _customerRepositary.Update(customerEntity);
 }