Пример #1
0
        public JsonResult GetDistricts(int cityId)
        {
            var response = new JsonViewModel {
                status = HttpStatusCode.InternalServerError, message = GeneralMessages.Error
            };

            try
            {
                response.data    = _mapper.Map <List <DropDownViewModel> >(_dropDownService.GetDistricts(cityId));
                response.status  = HttpStatusCode.OK;
                response.message = GeneralMessages.Ok;
            }
            catch (Exception ex)
            {
                _logger.Error(ex);
            }
            return(Json(response, JsonRequestBehavior.AllowGet));
        }