public ActionResult Index()
        {
            var data      = _categoryService.GetAll();
            var viewModel = Mapper.Map <List <ServiceCategory>, List <ServiceCategoryViewModel> >(data);

            return(View(viewModel));
        }
示例#2
0
        // GET: Admin/ServiceSubCategory/Create
        public ActionResult Create()
        {
            var viewModel = new ServiceSubcategoryViewModel
            {
                ServiceCategoriesSelectList = Mapper.Map <List <ServiceCategory>, List <SelectListItem> >(_categoryService.GetAll())
            };

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

            return(View(viewModel));
        }
示例#3
0
 public ActionResult Get()
 {
     return(Ok(
                serviceCategoryService.GetAll()
                ));
 }
        // GET: Admin/Category
        public ActionResult Index()
        {
            //var viewModel = Mapper.Map<IEnumerable<Client>, List<ClientViewModel>>(_clientService.GetAll());
            var viewModel = Mapper.Map <List <ServiceCategory>, List <ServiceCategoryViewModel> >(_categoryService.GetAll());

            return(View(viewModel));
        }