Пример #1
0
        // GET: Admin/ServiceSubcategory
        public ActionResult Index()
        {
            //var viewModel = Mapper.Map<IEnumerable<Client>, List<ClientViewModel>>(_clientService.GetAll());
            var viewModel = Mapper.Map <List <ServiceSubcategory>, List <ServiceSubcategoryViewModel> >(_subcategoryService.GetAll());

            return(View(viewModel));
        }
        // GET: Admin/Service/Create
        public ActionResult Create()
        {
            var viewModel = new ServiceViewModel
            {
                ServiceSubcategoriesSelectList = Mapper.Map <List <ServiceSubcategory>, List <SelectListItem> >(_subcategoryService.GetAll())
            };

            AddLocales(viewModel.Locales, (locale, languageId) => { });

            return(View(viewModel));
        }