public List <Clubs> Club_List() { using (var context = new StarTedContext()) { return(context.Clubs.ToList()); } }
// Use this class to help us with CRUD maintenance of our database public List <Course> ListCourses() { // Make use of our "virtual database" class to get the data using (var context = new StarTedContext()) { return(context.Courses.ToList()); } }
public List <Clubs> ClubActivities_FindByClub(string ClubID) { using (var context = new StarTedContext()) { IEnumerable <Clubs> results = context.Database.SqlQuery <Clubs>("ClubActivities_FindByClub @ClubID", ClubID); return(results.ToList()); } }