Beispiel #1
0
 public static void RegistrarAddCourse(cours c)
 {
     using (var ef = new baron_project1Entities())
     {
         ef.courses.Add(new cours {
             courseDepartment = c.courseDepartment, courseName = c.courseName, courseNumber = c.courseNumber, courseEnrollment = c.courseEnrollment, courseTime = c.courseTime, courseDate = c.courseDate, professorID = c.professorID
         });
         ef.SaveChanges();
     }
 }
 public static void RemoveStudentFromCourse(student s, cours c)
 {
     using (var ef = new baron_project1Entities())
     {
         ef.studentCourseLists.Remove(new studentCourseList {
             studentID = s.studentID, courseID = c.courseID
         });
         ef.SaveChanges();
     }
 }