public ActionResult Validate(PostViewModel postViewModel) { var errors = Resolve <ErrorsInPostQuery>().Execute(postViewModel.ToPost()); return(Json(new { status = "ok", data = errors })); }
public ActionResult Validate(PostViewModel postViewModel) { var errors = GetErrorsInPost(postViewModel.ToPost()); return Json(new { status = "ok", data = errors }); }
public ActionResult Save(string slug, PostViewModel postViewModel) { var result = db.Save(slug, postViewModel.ToPost()); return RedirectToAction("Show", BuildRouteParametersForPost(result.Slug, result.Version)); }
public Task <Post> Execute(string slug, PostViewModel postViewModel) { var result = posts.Save(slug, postViewModel.ToPost()); return(Task.FromResult(result)); }