BolfTracker.Infrastructure.EntityFramework.ShotTypeRepository.GetById C# (CSharp) Méthode

GetById() public méthode

public GetById ( int id ) : BolfTracker.Models.ShotType
id int
Résultat BolfTracker.Models.ShotType
        public ShotType GetById(int id)
        {
            using (var context = new BolfTrackerContext())
            {
                var shotType = context.ShotTypes.SingleOrDefault(st => st.Id == id);

                return shotType;
            }
        }