MVC 5 - RedirectToAction не перенаправляет
//
// POST: /Blog/CreateBlog
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult CreateBlog(BlogViewModel model)
{
var userId = User.Identity.GetUserId();
model.UserId = userId;
if (ModelState.IsValid && model.UserId != null)
{
Mapper.CreateMap<BlogViewModel, Blog>();
if (_blogProcess.CreateBlog(Mapper.Map<BlogViewModel, Blog>(model)))
{
RedirectToAction("Index", "Blog");
}
}
// If we got this far, something failed, redisplay form
return View(model);
}