public async Task <IActionResult> DeleteConfirmed(int id) { var objectToDelete = await _drivers.GetDriverById(id, true); if (objectToDelete == null) { return(NotFound()); } _drivers.Archive(objectToDelete); await _drivers.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); }