public ActionResult DeleteCompany(int?id) { try { companiesService.DeleteCompany(id); } catch (System.Exception ex) { return(RedirectToAction("GetCompaniesList", new { errorMessage = ex.Message })); } return(RedirectToAction("GetCompaniesList")); }