public void AddParticipant(Employee employee) { var participant = new ProjectParticipant { Project = this, ProjectId = Id, Employee = employee, EmployeeId = employee.Id }; var index = ParticipantsToDelete.IndexOf(s => s == participant); if (index == -1) { ParticipantsToAdd.Add(participant); } else { ParticipantsToDelete.RemoveAt(index); } }