Beispiel #1
0
        public ActionResult DeleteBuilding(Building building)
        {
            var  bldgRepo  = new BuildingRepository();
            bool isDeleted = bldgRepo.DeleteById(building.Id);

            //Delete addresses
            AddressManager.DeleteByBuildingId(building.Id);

            // Deletes the content.
            Document doc = new Document(CurrentPage.Parent.Id);

            doc.delete();

            return(RedirectToUmbracoPage(CurrentPage.Parent.Parent));
        }