Generation

generate functionSun, 20 Nov 2022

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)); }

Questions about programming?Chat with your personal AI assistant