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()); } }
public IEnumerable <Lecture> GetAllLectures() { using (DB_Context dB_Context = new DB_Context()) { return(dB_Context.Lectures.Include("Lecturer").ToList()); } }
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()); } }
public PowerRangerDal() { using (DB_Context dB_Context = new DB_Context()) { dB_Context.Database.Initialize(true); } }