BolfTracker.Infrastructure.EntityFramework.PlayerGameStatisticsRepository.GetByPlayer C# (CSharp) 메소드

GetByPlayer() 공개 메소드

public GetByPlayer ( int playerId ) : IEnumerable
playerId int
리턴 IEnumerable
        public IEnumerable<PlayerGameStatistics> GetByPlayer(int playerId)
        {
            using (var context = new BolfTrackerContext())
            {
                var playerGameStatistics = context.PlayerGameStatistics.Include(pgs => pgs.Player).Include(pgs => pgs.Game).Where(pgs => pgs.Player.Id == playerId).ToList();

                return playerGameStatistics;
            }
        }