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));
        }
Beispiel #2
0
 public void SaveChanges()
 {
     _context.SaveChangesAsync();
 }