public async Task <IActionResult> Edit(string id, [Bind("Id,Name,Place,Start,TotalTickets,PricePerTicket")] Event @event) { if (id != @event.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(@event); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EventExists(@event.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(All))); } return(View(@event)); }