Пример #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());
     }
 }
Пример #2
0
 public IEnumerable <Lecture> GetAllLectures()
 {
     using (DB_Context dB_Context = new DB_Context())
     {
         return(dB_Context.Lectures.Include("Lecturer").ToList());
     }
 }
Пример #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());
     }
 }
Пример #4
0
 public PowerRangerDal()
 {
     using (DB_Context dB_Context = new DB_Context()) { dB_Context.Database.Initialize(true); }
 }