示例#1
0
        public GetCityResponseDto GetCityByState()
        {
            var response    = new GetCityResponseDto();
            var queryParams = Request.GetQueryNameValuePairs();
            var stateId     = queryParams.FirstOrDefault(x => x.Key == "id").Value;
            int id;

            if (!int.TryParse(stateId, out id))
            {
                id = -1;
            }

            response.City = _iPmsLogic.GetCityByState(id);
            return(response);
        }