コード例 #1
0
        public async Task <IActionResult> EditPost(EditPostViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(RedirectToAction("EditPost", model));
            }

            await blogService.EditPost(model.BlogPostID, model.Content, model.Title, model.IsPublished);

            return(RedirectToAction("Posts", "Admin"));
        }