BolfTracker.Infrastructure.EntityFramework.ShotRepository.GetByGame C# (CSharp) 메소드

GetByGame() 공개 메소드

public GetByGame ( int gameId ) : IEnumerable
gameId int
리턴 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;
            }
        }