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

GetByGame() public method

public GetByGame ( int gameId ) : IEnumerable
gameId int
return IEnumerable
        public IEnumerable<Shot> GetByGame(int gameId)
        {
            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.Id == gameId).ToList();

                return shots;
            }
        }