Beispiel #1
0
 public string getFacultyName(int facId)
 {
     using (EventContext1 db = new EventContext1())
     {
         var name = (from x in db.Faculties
                     where x.id == facId
                     select x.name).FirstOrDefault();
         return(name);
     }
 }
Beispiel #2
0
 public string getMajorName(int?majorid)
 {
     using (EventContext1 db = new EventContext1())
     {
         var name = (from x in db.Majors
                     where x.id == majorid
                     select x.name).FirstOrDefault();
         return(name);
     };
 }
Beispiel #3
0
        public List <Faculty> FacultyList()
        {
            EventContext1 db = new EventContext1();

            return(db.Faculties.ToList());
        }