public async Task <IActionResult> _CreateNew(Order order) { _context.Add(order); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <IActionResult> Create([Bind("ID,Email,Description,TotalPrice")] Order order) { if (ModelState.IsValid) { _context.Add(order); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(order)); }