public ActionResult UpdatePost(PostViewModel postViewModel)
 {
     if (ModelState.IsValid)
     {
         _postProvider.UpdatePost(postViewModel.PostId, postViewModel.PostName);
         return(Redirect("~/Post/PostsList"));
     }
     else
     {
         return(View("GetPost", postViewModel));
     }
 }
Exemple #2
0
        public async Task UpdatePost([FromBody] PostUpdate postUpdate)
        {
            var post = _mapper.Map <Business.Post.PostUpdate>(postUpdate);

            await _postProvider.UpdatePost(post);
        }
 public bool UpdatePost(Post post)
 {
     return(_postProvider.UpdatePost(post));
 }