private bool SetStarState(string playerId, bool newState) { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new LeagueService(userId); //Get Player var detail = service.GetPlayerById(playerId); //Create the PlayerDetail model instance with the new star state var updatedPlayer = new PlayerEdit { PlayerId = detail.Id, IsStarred = newState }; //Return a value indicating whether the update succeeded return(service.UpdatePlayer(updatedPlayer)); }