public ActionResult Services() { GetAboutServicesQueryResult result = Query.For <GetAboutServicesQueryResult>().With(new EmptyCriterion()); AboutServicesViewModel vm = ToViewModel(result); return(View(vm)); }
public ActionResult Services(AboutServicesViewModel vm) { Command.Execute(new EditAboutServicesCommand { Services = ToModel(vm) }); return(RedirectToAction("Index")); }
protected AboutServices ToModel(AboutServicesViewModel vm) { AboutServices model = Mapper.Map <AboutServices>(vm); return(model); }
protected AboutServicesViewModel ToViewModel(GetAboutServicesQueryResult result) { AboutServicesViewModel vm = Mapper.Map <AboutServicesViewModel>(result.Services); return(vm); }