Esempio n. 1
0
 public IEnumerable <Lecture> GetLecturesByDate(DateTime?selectedDate)
 {
     using (DB_Context dB_Context = new DB_Context())
     {
         return(dB_Context.Lectures.Include("Lecturer").Where(l => l.Date == selectedDate).ToArray());
     }
 }
Esempio n. 2
0
 public IEnumerable <Lecture> GetAllLectures()
 {
     using (DB_Context dB_Context = new DB_Context())
     {
         return(dB_Context.Lectures.Include("Lecturer").ToList());
     }
 }
Esempio n. 3
0
 public IEnumerable <Lecture> GetLecturesByLectureName(string PartialLectureName)
 {
     using (DB_Context dB_Context = new DB_Context())
     {
         return(dB_Context.Lectures.Include("Lecturer").Where(l => l.Name.StartsWith(PartialLectureName)).ToArray());
     }
 }
Esempio n. 4
0
 public PowerRangerDal()
 {
     using (DB_Context dB_Context = new DB_Context()) { dB_Context.Database.Initialize(true); }
 }