Ejemplo n.º 1
0
        public IActionResult GetCounty(int stateId, int id)
        {
            if (!_myAppRepository.StateExists(stateId))
            {
                return(NotFound());
            }

            var county = _myAppRepository.GetCountyForState(stateId, id);

            if (county == null)
            {
                return(NotFound());
            }

            return(Ok(_mapper.Map <CountyDto>(county)));
        }