public void EditSubjectType(SubjectType toEdit)
 {
     if (toEdit != null)
     {
         SPDatabase.DB.SaveChanges();
     }
 }
        public void AddSubjectType(NewSubjectType toAdd)
        {
            if (toAdd != null)
            {
                SubjectType st = new SubjectType()
                {
                    Name = toAdd.SubjectTypeName,
                };

                SPDatabase.DB.SubjectTypes.AddObject(st);
                SPDatabase.DB.SaveChanges();
            }
        }
 public void DeleteSubjectType(SubjectType st)
 {
     SPDatabase.DB.SubjectTypes.DeleteObject(st);
     SPDatabase.DB.SaveChanges();
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the SubjectTypes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSubjectTypes(SubjectType subjectType)
 {
     base.AddObject("SubjectTypes", subjectType);
 }
 /// <summary>
 /// Create a new SubjectType object.
 /// </summary>
 /// <param name="subjectTypeID">Initial value of the SubjectTypeID property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 public static SubjectType CreateSubjectType(global::System.Int32 subjectTypeID, global::System.String name)
 {
     SubjectType subjectType = new SubjectType();
     subjectType.SubjectTypeID = subjectTypeID;
     subjectType.Name = name;
     return subjectType;
 }