Ejemplo n.º 1
0
        public ActionResult InsertArticle(Articles article, string userId)
        {
            if (ModelState.IsValid)
            {
                var id = User.Identity.GetUserId();
                if (_articlesRepository.InsertArticle(article, id))
                {
                    return(RedirectToAction("Index", "Articles"));
                }
            }

            return(View());
        }