示例#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
     });
 }
示例#2
0
 public Model.Customer AddCustomer(Model.Customer newCustomer)
 {
     _context.Customers.Add(_mapper.ParseCustomer(newCustomer));
     _context.SaveChanges();
     return(newCustomer);
 }