public void AddSpecialization(NewSpecialization toAdd)
        {
            if (toAdd != null)
            {
                Specialization i = new Specialization()
                {
                    Name = toAdd.SpecializationName,
                    FacultyID = toAdd.FacultyId,
                    DepartamentID = toAdd.DepartamentId
                };

                SPDatabase.DB.Specializations.AddObject(i);
                SPDatabase.DB.SaveChanges();
            }
        }
 public void EditSpecialization(Specialization toEdit)
 {
     if (toEdit != null)
     {
         SPDatabase.DB.SaveChanges();
     }
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Specializations EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSpecializations(Specialization specialization)
 {
     base.AddObject("Specializations", specialization);
 }
 public void DeleteSpecialization(Specialization s)
 {
     SPDatabase.DB.Specializations.DeleteObject(s);
     SPDatabase.DB.SaveChanges();
 }
 /// <summary>
 /// Create a new Specialization object.
 /// </summary>
 /// <param name="specializationID">Initial value of the SpecializationID property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="departamentID">Initial value of the DepartamentID property.</param>
 /// <param name="facultyID">Initial value of the FacultyID property.</param>
 public static Specialization CreateSpecialization(global::System.Int32 specializationID, global::System.String name, global::System.Int32 departamentID, global::System.Int32 facultyID)
 {
     Specialization specialization = new Specialization();
     specialization.SpecializationID = specializationID;
     specialization.Name = name;
     specialization.DepartamentID = departamentID;
     specialization.FacultyID = facultyID;
     return specialization;
 }