public void AddPhone(Phone phone) { if (!Phones.Contains(phone)) { this.Phones.Add(phone); } }
public bool RemovePhone(Phone phone) { if (phone is null) { throw new EntityNotFoundException("User -> Phone"); } if (!Phones.Contains(phone)) { return(false); } Phones.Remove(phone); return(true); }