In a registry, c # windows form, where I use CPF's or CNPJ's what is the best way to prevent duplication of names / corporate names in inclusion or change.
For example, it may happen that in the change the user informs a name / reason that is already registered.
Using names to search would not be indicated because the spaces between can be interpreted as differentiators eg "William da Silva" and "William da Silva".
What is the best approach to this problem?