Пример #1
0
        public IActionResult DeletePost(Guid postid)
        {
            try
            {
                _blogManager.DeleteEntry(postid.ToString());
            }
            catch (Exception ex)
            {
                RedirectToAction("Error");
            }

            return(RedirectToAction("Index", "Home"));
        }
Пример #2
0
        public IActionResult DeletePost(Guid postid)
        {
            try
            {
                blogManager.DeleteEntry(postid.ToString());
            }
            catch (Exception ex)
            {
                logger.LogError(new EventDataItem(EventCodes.Error, null, "Blog post delete failed: {0} {1}", postid.ToString(), ex.Message));
                RedirectToAction("Error");
            }

            BreakSiteCache();

            return(RedirectToAction("Index", "Home"));
        }