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

GetById() public method

public GetById ( int id ) : BolfTracker.Models.Shot
id int
return BolfTracker.Models.Shot
        public Shot GetById(int id)
        {
            using (var context = new BolfTrackerContext())
            {
                var shot = context.Shots.Include(s => s.ShotType).Include(s => s.Hole).Include(s => s.Player).Include(s => s.Game).SingleOrDefault(s => s.Id == id);

                return shot;
            }
        }