public override Task <ModuleViewComponentResult> OnViewComponentDelete() { if (ArticleId <= 0) { return(OnViewComponentLoad()); } // Delete article _articleBusiness.DeleteArticle(ArticleId); ViewData["Message"] = "Article was deleted"; return(OnViewComponentLoad()); }
public IActionResult Delete([FromBody] int id) { _articleBusiness.DeleteArticle(id); return(Ok()); }