public async Task <IActionResult> Create([Bind("IdCustomer,CookieID")] Customer customer) { if (ModelState.IsValid) { _context.Add(customer); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(customer)); }
public async Task <IActionResult> Create([Bind("IdOrder,IdCustomer,Date,Time,Price")] Orders orders) { if (ModelState.IsValid) { _context.Add(orders); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(orders)); }
public async Task <IActionResult> Create([Bind("IdItem,Catagory,Name,Url,Price")] Items items) { if (ModelState.IsValid) { _context.Add(items); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(items)); }
public async Task <IActionResult> Create([Bind("IdOrder,IdItem,Quantity")] ItemsOrdered itemsOrdered) { if (ModelState.IsValid) { _context.Add(itemsOrdered); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(itemsOrdered)); }