public IActionResult Delete(int raceId) { Race deletedRace = repository.DeleteRace(raceId); if (deletedRace != null) { TempData["message"] = $"{deletedRace.Name} was deleted"; } return(RedirectToAction("Index")); }