public IActionResult DeleteSportsBuilding(int SportsBuildingID) { SportsBuilding deletedSportsBuilding = repository.DeleteSportsBuilding(SportsBuildingID); if (deletedSportsBuilding != null) { //TempData["message"] = $"{deletedSportsBuilding.Name} was deleted"; } return(RedirectToAction("SportsBuilding")); }
public IActionResult Delete(int id) { repository.DeleteSportsBuilding(id); return(Ok(repository.SportsBuildingOnly)); }