public bool AddContnact(string number, string name, int personId) { ContactIsUnique contactIsUnique = new ContactIsUnique(); var person = _personRepository.Find(personId); if (person == null) { return(false); } if (contactIsUnique.IsContactUnique(person, name)) { _personRepository.AddContact(name, number, personId); return(true); } return(false); }