Exemple #1
0
        public ActionResult Services()
        {
            GetAboutServicesQueryResult result = Query.For <GetAboutServicesQueryResult>().With(new EmptyCriterion());

            AboutServicesViewModel vm = ToViewModel(result);

            return(View(vm));
        }
Exemple #2
0
        public ActionResult Services(AboutServicesViewModel vm)
        {
            Command.Execute(new EditAboutServicesCommand
            {
                Services = ToModel(vm)
            });

            return(RedirectToAction("Index"));
        }
Exemple #3
0
        protected AboutServices ToModel(AboutServicesViewModel vm)
        {
            AboutServices model = Mapper.Map <AboutServices>(vm);

            return(model);
        }
Exemple #4
0
        protected AboutServicesViewModel ToViewModel(GetAboutServicesQueryResult result)
        {
            AboutServicesViewModel vm = Mapper.Map <AboutServicesViewModel>(result.Services);

            return(vm);
        }