public async Task <IActionResult> Create([Bind("TotalPrice,Status,StoreId,TimeOfOrder,Id")] Order order) { if (ModelState.IsValid) { _context.Add(order); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(order)); }
public void SaveChanges() { _context.SaveChangesAsync(); }