public async Task <IActionResult> Edit(Guid id, [Bind("Id,Name,Data,Status")] Machines machines) { if (id != machines.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(machines); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MachinesExists(machines.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(machines)); }