Example #1
0
        public async Task <IActionResult> GetCount(string code)
        {
            var playerCountDto = new PlayerCountDto();

            if (!await competitionService.Exist(code))
            {
                return(StatusCode(StatusCodes.Status404NotFound, new StatusMessage("Not Found")));
            }
            playerCountDto.total = await playersService.GetCountByLeagueCode(code);

            return(Ok(playerCountDto));
        }