Esempio n. 1
0
        public ActionResult Delete(SportsSide.DAL.FACILITY facility)
        {
            webApi.DeleteAllFacilityPicturesFromId(facility.FACILITY_ID);
            var result = webApi.DeleteFacility(facility);

            if (result == false)
            {
                var oldfacility = webApi.GetFacility(facility.FACILITY_ID);
                TempData["Hata"] = "Bir hata oluştu.";
                return(View(oldfacility));
            }
            return(RedirectToAction("Index", "Facilities"));
        }