BrokenShoeLeague.Web.API.Controllers.PlayersController.GetPlayer C# (CSharp) Method

GetPlayer() private method

private GetPlayer ( int id ) : IHttpActionResult
id int
return IHttpActionResult
        public IHttpActionResult GetPlayer(int id)
        {
            if (!_brokenShoeLeagueRepository.PlayerExist(id))
                return NotFound();

            var player = _brokenShoeLeagueRepository.GetPlayerById(id);

            return Ok(new
            {
                player.Id,
                player.Name,
                player.ImageProfileUrl,
                player.Enabled,
            });
        }