public async Task<ActionResult> AddArticle(Article article) { if (ModelState.IsValid) { await _iArticleBL.AddArticle(article); ViewBag.Articles = await _iArticleBL.GetLatestArticles(); return View("~/Views/Home/Index.cshtml"); } ViewBag.Categories = await _iCategoryBL.GetCategoriesForDropDownList(); return View(); }
public async Task AddArticle(Article article) { await _iArticleDal.InsertAsync(article); }