public async Task <IActionResult> Create([Bind("CustomerId,Name,Address,CheckIn,CheckOut,RoomNumber,EmailAddress,Billing")] CustomerModel customerModel) { if (ModelState.IsValid) { _context.Add(customerModel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(customerModel)); }
public async Task <IActionResult> Create([Bind("ID,Idnumber,Name,Course,Year,TshirtColor,Size,AmountPaid")] StudentModel studentModel) { if (ModelState.IsValid) { _context.Add(studentModel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(studentModel)); }