コード例 #1
0
        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();
        }
コード例 #2
0
 public async Task AddArticle(Article article)
 {
     await _iArticleDal.InsertAsync(article);
 }