Beispiel #1
0
        public ActionResult BlogPostUpdate(BlogModel model)
        {
            var response = model.Id == 0
                ? _blogService.BlogPostAdd(model)
                : _blogService.BlogPostEdit(model);

            if (response.IsSuccess)
            {
                return(RedirectToAction("EditBlogPost", new{ id = response.Value }));
            }
            return(RedirectToAction("Index"));
        }