public ActionResult AddPost(PostViewModel postViewModel) { if (ModelState.IsValid) { _postProvider.AddPost(postViewModel.PostName); return(Redirect("~/Post/PostsList")); } else { return(View(postViewModel)); } }