BolfTracker.Infrastructure.EntityFramework.ShotRepository.GetByMonthAndYear C# (CSharp) Method

GetByMonthAndYear() public method

public GetByMonthAndYear ( int month, int year ) : IEnumerable
month int
year int
return IEnumerable
        public IEnumerable<Shot> GetByMonthAndYear(int month, int year)
        {
            using (var context = new BolfTrackerContext())
            {
                var shots = context.Shots.Include(shot => shot.ShotType).Include(shot => shot.Hole).Include(shot => shot.Player).Include(shot => shot.Game).Where(shot => shot.Game.Date.Month == month && shot.Game.Date.Year == year).ToList();

                return shots;
            }
        }