BolfTracker.Infrastructure.EntityFramework.PlayerGameStatisticsRepository.GetByPlayerMonthAndYear C# (CSharp) Method

GetByPlayerMonthAndYear() public method

public GetByPlayerMonthAndYear ( int playerId, int month, int year ) : IEnumerable
playerId int
month int
year int
return IEnumerable
        public IEnumerable<PlayerGameStatistics> GetByPlayerMonthAndYear(int playerId, int month, int year)
        {
            using (var context = new BolfTrackerContext())
            {
                var playerGameStatistics = context.PlayerGameStatistics.Include(pgs => pgs.Player).Include(pgs => pgs.Game).Where(pgs => pgs.Player.Id == playerId && pgs.Game.Date.Month == month && pgs.Game.Date.Year == year).ToList();

                return playerGameStatistics;
            }
        }