public async Task <ActionResult> EditArticle(EditArticleViewModel model) { if (ModelState.IsValid) { var articleManage = new ArticleManage(); await articleManage.EditArticle(model.Id, model.Title, model.Content, model.CategoryIds); return(RedirectToAction("ArticleList")); } else { var userid = Guid.Parse(Session["userId"].ToString()); ViewBag.CategoryIds = await new ArticleManage().GetAllCagetory(userid); return(View(model)); } }