public void AddSubjectArea(SubjectArea subjectArea)
 {
     entities.AddToSubjectAreas(subjectArea);
     entities.SaveChanges();
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the SubjectAreas EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSubjectAreas(SubjectArea subjectArea)
 {
     base.AddObject("SubjectAreas", subjectArea);
 }
 public void AssignNewGrade(Pupil pupil, SubjectArea subjectArea, int grade)
 {
     entities.AddToGrades(new Grade() { Pupil = pupil, SubjectArea = subjectArea, Value = grade });
     entities.SaveChanges();
 }
 /// <summary>
 /// Create a new SubjectArea object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="subjectID">Initial value of the SubjectID property.</param>
 public static SubjectArea CreateSubjectArea(global::System.Int32 id, global::System.String name, global::System.Int32 subjectID)
 {
     SubjectArea subjectArea = new SubjectArea();
     subjectArea.ID = id;
     subjectArea.Name = name;
     subjectArea.SubjectID = subjectID;
     return subjectArea;
 }