コード例 #1
0
        public async Task <IActionResult> GetAll()
        {
            var cities = await _crudPattern.GetAll();

            if (cities.Count == 0)
            {
                return(NoContent());
            }
            return(Ok(cities));
        }
コード例 #2
0
        public async Task <IActionResult> GetAll()
        {
            var workLocations = await _crudPattern.GetAll();

            if (workLocations.Count == 0)
            {
                return(NoContent());
            }
            var result = _mapper.Map <List <WorkLocationReadDto> >(workLocations);

            return(Ok(result));
        }
コード例 #3
0
        public async Task <IActionResult> GetAll()
        {
            var users = await _crudPattern.GetAll();

            if (users.Count == 0)
            {
                return(NoContent());
            }
            var result = _mapper.Map <List <UserReadDto> >(users);

            return(Ok(result));
        }