public void EditSemester(Semester toEdit)
 {
     if (toEdit != null)
     {
         SPDatabase.DB.SaveChanges();
     }
 }
        public void AddSemester(NewSemester toAdd)
        {
            if (toAdd != null)
            {
                Semester s = new Semester()
                {
                    Name = toAdd.SemesterName,
                    Semester1 = toAdd.SemesterNo,
                    StudyYear = toAdd.SemesterYear
                };

                SPDatabase.DB.Semesters.AddObject(s);
                SPDatabase.DB.SaveChanges();
            }
        }
 public void DeleteSpecialization(Semester s)
 {
     SPDatabase.DB.Semesters.DeleteObject(s);
     SPDatabase.DB.SaveChanges();
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Semesters EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSemesters(Semester semester)
 {
     base.AddObject("Semesters", semester);
 }
 /// <summary>
 /// Create a new Semester object.
 /// </summary>
 /// <param name="semesterID">Initial value of the SemesterID property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="studyYear">Initial value of the StudyYear property.</param>
 /// <param name="semester1">Initial value of the Semester1 property.</param>
 public static Semester CreateSemester(global::System.Int32 semesterID, global::System.String name, global::System.Int32 studyYear, global::System.Int32 semester1)
 {
     Semester semester = new Semester();
     semester.SemesterID = semesterID;
     semester.Name = name;
     semester.StudyYear = studyYear;
     semester.Semester1 = semester1;
     return semester;
 }