Beispiel #1
0
        public static InstitutionViewModel ToViewModel(this Institution model)
        {
            var viewModel = new InstitutionViewModel();
            viewModel.InjectFrom(model);

            return viewModel;
        }
 public ActionResult Edit(InstitutionViewModel viewModel)
 {
     if (ModelState.IsValid)
     {
         var model = viewModel.ToModel();
         this._institutionManager.Update(model);
         return this.Json(new { success = true });
     }
     return this.Json(new { success = false });
 }