Exemplo n.º 1
0
        [Route("AddPlayer")]//works
        public async Task <ActionResult> AddPlayer([FromBody] Player player)
        {
            await league.AddPlayer(player);

            return(CreatedAtAction(nameof(GetPlayers), new { id = player.PlayerId }, player));
        }