public void Delete(Assignment assignment)
 {
     var assignmentForDeletion = AllAssignments.Find(a => a.Id == assignment.Id);
     AllAssignments.Remove(assignmentForDeletion);
     Serialize();
     GetAllAssignments();
 }
 public void Change(Assignment assignment)
 {
     var assignmentToChange = AllAssignments.Find(u => u.Id == assignment.Id);
     if (AllAssignments.Any(u => u.Name == assignment.Name))
     {
         throw new InvalidOperationException("AssignmentName is already used");
     }
     AllAssignments.Remove(assignmentToChange);
     AllAssignments.Add(assignment);
     Serialize();
     GetAllAssignments();
 }
 public void Add(Assignment assignment)
 {
     AllAssignments.Add(assignment);
     Serialize();
     GetAllAssignments();
 }