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