コード例 #1
0
        public IActionResult DeleteSportsBuilding(int SportsBuildingID)
        {
            SportsBuilding deletedSportsBuilding = repository.DeleteSportsBuilding(SportsBuildingID);

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