Ejemplo n.º 1
0
 public Entity.Customer ParseCustomer(StoreModel.Customer customer)
 {
     return(new Entity.Customer
     {
         CustomerFname = customer.FName,
         CustomerLname = customer.LName,
         CustomerUsername = customer.Username,
         CustomerPasswordhash = customer.PasswordHash
                                //do i need to return lists of carts/orders? I'm not sure yet
     });
 }
Ejemplo n.º 2
0
 public Model.Customer AddCustomer(Model.Customer newCustomer)
 {
     _context.Customers.Add(_mapper.ParseCustomer(newCustomer));
     _context.SaveChanges();
     return(newCustomer);
 }