public override Task <ModuleViewComponentResult> OnViewComponentDelete()
        {
            if (ArticleId <= 0)
            {
                return(OnViewComponentLoad());
            }

            // Delete article
            _articleBusiness.DeleteArticle(ArticleId);

            ViewData["Message"] = "Article was deleted";

            return(OnViewComponentLoad());
        }
示例#2
0
        public IActionResult Delete([FromBody] int id)
        {
            _articleBusiness.DeleteArticle(id);

            return(Ok());
        }