コード例 #1
0
 public void AddSubjectArea(SubjectArea subjectArea)
 {
     entities.AddToSubjectAreas(subjectArea);
     entities.SaveChanges();
 }
コード例 #2
0
 /// <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);
 }
コード例 #3
0
 public void AssignNewGrade(Pupil pupil, SubjectArea subjectArea, int grade)
 {
     entities.AddToGrades(new Grade() { Pupil = pupil, SubjectArea = subjectArea, Value = grade });
     entities.SaveChanges();
 }
コード例 #4
0
 /// <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;
 }