Exemplo n.º 1
0
    private void AddRequiredToShuffle(MentorDataModel mentor)
    {
        Root.Shuffle.AddStudentsToShuffle(mentor, mentor.Required);

        foreach (var req in mentor.Required)
        {
            _readyToShuffleStudents.Remove(_readyToShuffleStudents.FirstOrDefault(r => r.FullName == req.FullName));
        }
    }
    public MentorShuffleModel(MentorDataModel mentor)
    {
        Mentor = mentor;

        _students = new List <StudentDataModel>();
    }
 public MentorShuffleModel GetShuffleByMentor(MentorDataModel mentorData)
 => Shuffles.FirstOrDefault(m => m.Mentor == mentorData);
 public void AddStudentToShuffle(MentorDataModel mentorData, StudentDataModel studentData) =>
 GetShuffleByMentor(mentorData.FullName).AddStudent(studentData);
    public void AddStudentsToShuffle(MentorDataModel mentorData, IEnumerable <StudentDataModel> studentsData)
    {
        var shuffle = GetShuffleByMentor(mentorData.FullName);

        shuffle.AddStudents(studentsData);
    }