Exemplo n.º 1
0
        private CollectionDataService()
        {
            var xmlRegionCollection = context
                                      .Deserialize <RegionsCollection>("..\\..\\Data_Source\\RegionsData.xml")
                                      .Region;

            RegionCollection.AddRange(xmlRegionCollection);

            var xmlGendersType = context
                                 .Deserialize <GendersCollection>("..\\..\\Data_Source\\GenderData.xml")
                                 .Gender;

            GenderTypes.AddRange(xmlGendersType);

            var xmlSubjects = context
                              .Deserialize <SubjectsCollection>("..\\..\\Data_Source\\SubjectsWithStudentsData.xml")
                              .Subjects;

            SubjWithStudents.AddRange(xmlSubjects);

            var users = context
                        .Deserialize <UsersCollection>("..\\..\\Data_Source\\UniversitySystemData.xml");

            List <Lecturer> xmlLecturers = users.Lecturers;

            Lecturers.AddRange(xmlLecturers);

            List <Student> xmlStudents = users.Students;

            Students.AddRange(xmlStudents);
        }