예제 #1
0
        public async Task <IActionResult> GetListClubs(string clubId)
        {
            if (!int.TryParse(clubId, out int id))
            {
                return(BadRequest("Id shoud be integer"));
            }

            var fields = await _fieldRepository.FindByCriteria(i => i.ClubId == id);

            var mappedFields = AutoMapper.Mapper.Map <IList <DTO.Field.Output.Field> >(fields);

            return(Ok(mappedFields));
        }