public ActionResult EditingNews_Create(NewsVM news) { news.Content = HttpUtility.HtmlDecode(news.Content); var value = HttpContext.Session.GetString("SessionUser"); UserVM user = JsonConvert.DeserializeObject <UserVM>(value); _newsBusiness.CreateNews(news, user); return(Content("")); }
public ActionResult Create(News news) { if (ModelState.IsValid) { _businessNews.CreateNews(news); return(RedirectToAction("Index")); } ViewData["User"] = new SelectList(_businessUser.ListUser(), "UserId", "UserName"); return(View(news)); }