public ActionResult Edit(PostViewModel post) { if (ModelState.IsValid) { var postDto = Mapper.Map <PostDto>(post); _postManager.EditPost(postDto); return(RedirectToAction("Index")); } return(View()); }