Ejemplo n.º 1
0
        public async Task <IActionResult> PostPlayer([FromBody] Player player)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            await _service.AddSync(player);

            return(CreatedAtAction("GetPlayer", new { id = player.PlayerId }, player));
        }