public ActionResult Edit(EditViewModel model) { var entity = Service.Get<Post>(model.Post.Id).Result; this.UpdateModel(entity, "Post"); var response = Service.Save(entity); return this.Redirect("/admin"); }
public ActionResult Edit(int id) { var response = Service.Get<Post>(id); var model = new EditViewModel() { Post = response.Result }; return View(model); }