Пример #1
0
 public bool DeleteStudent(StudentDTO student)
 {
     var index = _studentDatabase.FindIndex(p => p.Id == student.Id);
     if (index >= 0) {
         _studentDatabase[index].Status = false;
         return true;
     }
     return false;
 }
Пример #2
0
 public bool UpdateStudent(StudentDTO student)
 {
     var index = _studentDatabase.FindIndex(p => p.Id == student.Id);
     if (index >= 0) {
         _studentDatabase[index] = student;
         return true;
     }
     return false;
 }
Пример #3
0
 public void CreateStudent(StudentDTO student)
 {
     _studentDatabase.Add(student);
 }