public IEnumerable<Grade> GetGradesOfPupil(Pupil pupil, Subject subject) { return (from grade in pupil.Grades where grade.SubjectArea.SubjectID == subject.ID orderby grade.SubjectArea.Name descending select grade); }
public void AddSubject(Subject subject) { entities.AddToSubjects(subject); entities.SaveChanges(); }
public void AssignSubject(Teacher teacher, Subject subject, SchoolClass schoolClass) { entities.AddToTeacherSubjectAssignments(new TeacherSubjectAssignment() { Teacher = teacher, Subject = subject, SchoolClass = schoolClass}); entities.SaveChanges(); }
public void AssignVoluntarySubject(Pupil pupil, Subject subject) { entities.AddToVoluntarySubjectAssignements(new VoluntarySubjectAssignement() { Pupil = pupil, Subject = subject }); entities.SaveChanges(); }
public void AssignSubject(Branch branch, Subject subject, int level) { entities.AddToBranchSubjectAssignments(new BranchSubjectAssignment() { Branch = branch, Subject = subject, Level = level }); entities.SaveChanges(); }
public void AssignSPF(Pupil pupil, Subject subject, int level) { entities.AddToSPFs(new SPF() { Pupil = pupil, Subject = subject, Level = level }); entities.SaveChanges(); }
public void AssignSPF(Pupil pupil, Subject subject) { entities.AddToSPFs(new SPF() { Pupil = pupil, Subject = subject, Level = pupil.SchoolClass.Level }); entities.SaveChanges(); }
/// <summary> /// Deprecated Method for adding a new object to the Subjects EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToSubjects(Subject subject) { base.AddObject("Subjects", subject); }
/// <summary> /// Create a new Subject object. /// </summary> /// <param name="id">Initial value of the ID property.</param> /// <param name="name">Initial value of the Name property.</param> /// <param name="isVoluntary">Initial value of the IsVoluntary property.</param> /// <param name="isBinding">Initial value of the IsBinding property.</param> public static Subject CreateSubject(global::System.Int32 id, global::System.String name, global::System.Boolean isVoluntary, global::System.Boolean isBinding) { Subject subject = new Subject(); subject.ID = id; subject.Name = name; subject.IsVoluntary = isVoluntary; subject.IsBinding = isBinding; return subject; }