Exemple #1
0
        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");
        }
Exemple #2
0
 public ActionResult Edit(int id)
 {
     var response = Service.Get<Post>(id);
     var model = new EditViewModel()
     {
         Post = response.Result
     };
     return View(model);
 }