Example #1
0
        public async Task <IActionResult> AddPlayerScore([FromBody] PlayerScore playerScore)
        {
            var result = await _playerService.AddPlayerScore(playerScore);

            if (result != null)
            {
                return(CreatedAtRoute(nameof(GetPlayerScoresById), new{ id = playerScore.PlayerId }, playerScore));
            }
            return(NotFound());
        }