public IActionResult DeleteAthlete(AthleteModel model) { int result = 0; string domainName = _configuration["DomainName"].ToSafeString(); if (!string.IsNullOrEmpty(domainName)) { result = BALUser.DeleteAthlete(model.MapId.ToSafeInt(), domainName); switch (result) { case 0: TempData["message"] = "Something went wrong."; TempData["IsSuccess"] = 0; break; case 1: TempData["message"] = "Record successfully deleted."; TempData["IsSuccess"] = 1; break; } } return(RedirectToAction("AthleteList", new { id = model.TestId })); }