create fully repository of student with CRUD
public static List<Student> getStudents() { return students; } public static Student getStudent(string matricule) { return students.FirstOrDefault(x => x.matricule == matricule); } public static void addStudent(Student student) { students.Add(student); } public static void updateStudent(Student student) { students.Add(student); } public static void deleteStudent(string matricule) { students.Remove(getStudent(matricule)); }