public IActionResult Delete(int id) { try { Contractor deleteContractor = _repository.DeleteContractor(id); return(RedirectToAction("Index")); } catch { return(View()); } }