public void UpdateOrAddStudent(Student student) { int result = students.RemoveAll(x => x.Id == student.Id); students.Add(student); XmlService.WriteXml(students); }
public void DeleteStudent(string id) { int result = students.RemoveAll(x => x.Id == id); if (result > 0) { XmlService.WriteXml(students); } }
public Repository() { students = XmlService.ReadXml <List <Student> >(); }