ITimeU.Models.AthleteClassModel.GetAll C# (CSharp) Method

GetAll() public static method

Retrieves all athlete classes in the database.
public static GetAll ( ) : List
return List
        public static List<AthleteClassModel> GetAll()
        {
            using (var context = new Entities())
            {
                return context.AthleteClasses.Select(clss => new AthleteClassModel()
                {
                    Id = clss.ID,
                    Name = clss.Name
                }).OrderBy(clss => clss.Name).ToList();
            }
            //athleteClassModels.Insert(0, null);
        }