Beispiel #1
0
        //[Authorize(Roles = nameof(PermissionProvider.ViewGroup))]
        public HttpResponseMessage GetAll(HttpRequestMessage request)
        {
            return(CreateHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;
                var model = _continentService.GetAll();
                response = request.CreateResponse(HttpStatusCode.OK, model);

                return response;
            }));
        }
Beispiel #2
0
        public ActionResult ForeignCategory()
        {
            MenuGeographyVm model              = new MenuGeographyVm();
            var             modelContinent     = _continentService.GetAll(true);
            var             modelCountryRegion = _countryRegionService.GetAll(true);
            var             modelStateProvince = _stateProvinceService.GetAll(true);
            var             modelArea          = _areaService.GetAll(true);

            model.Continents     = Mapper.Map <List <ContinentVm> >(modelContinent);
            model.CountryRegions = Mapper.Map <List <CountryRegionVm> >(modelCountryRegion);
            model.StateProvinces = Mapper.Map <List <StateProvinceVm> >(modelStateProvince);
            model.Areas          = Mapper.Map <List <AreaVm> >(modelArea);
            return(PartialView(model));
        }