예제 #1
0
 public void AddPhone(Phone phone)
 {
     if (!Phones.Contains(phone))
     {
         this.Phones.Add(phone);
     }
 }
예제 #2
0
        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);
        }