public async Task <IActionResult> Create([Bind("ID,CustomerId,OrderDate,DeliveryDate,Address1,PostalCode,Total,Weight,PaymentType,Details,SpecialInstructions,Status,DriverId")] Order order) { if (ModelState.IsValid) { _context.Add(order); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(order)); }
public async Task <IActionResult> Create([Bind("ID,FirstName,LastName,UserName,Password,StartDate,RegistrationDate,Address1,City,Province,PostalCode,PhoneNumber,SpecialInstructions,Status,Photo")] Customer customer) { if (ModelState.IsValid) { _context.Add(customer); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(customer)); }