public void Print(object studentsCollection, long id) { StudentsCollections students = ((StudentsCollections)studentsCollection); for (int i = 0; i < students.Length(); i++) { MenuHelper.PrintArrow((int)id, i); Console.WriteLine(students.GetAll()[i]); } }
private void ChooseDatabase(string database) { IFactory factory = FactoryProvider.GetFactory(database); repositories = new List <IRepository>(); repositories.Clear(); collections.Clear(); studentsRepo = factory.GetRepository("Students"); teachersRepo = factory.GetRepository("Teachers"); facultiesRepo = factory.GetRepository("Faculties"); repositories.Add(studentsRepo); repositories.Add(teachersRepo); repositories.Add(facultiesRepo); StudentsCollections studentsCollections = new StudentsCollections(studentsRepo.GetAll()); TeachersCollections teachersCollections = new TeachersCollections(teachersRepo.GetAll()); FacultiesCollection facultiesCollection = new FacultiesCollection(facultiesRepo.GetAll()); collections.Add(studentsCollections); collections.Add(teachersCollections); collections.Add(facultiesCollection); //MenuHelper. }