Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- interface IDBcontext
- {
- List<Student> GetAllStudents();
- List<Klass> GetAllKlasses();
- Student FindStudentById(int studentID);
- void RemoveStudent(Student);
- void SaveStudent(Student);
- // Other methods if needed
- // The same for klass....
- Klass FindKlassById(int klassID);
- }
- class XmlDBContext : IDBContext
- {
- XmlDBContext(string filename) {}
- }
- class Program
- {
- public static void Main(string[] args)
- {
- IDBContext dbContext = new XmlDBContext("file.xml");
- // ...
- dbContext.SaveStudent(...);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement