In my opinion the best way to handle this kind of requirement is to let the database prevent duplicates. This would mean that you create either a primary key for the table or a unique constraint. See
-
Create Primary Keys[
^]
-
Create Unique Constraints[
^]
This would mean that you don't check anything beforehand, just try to insert the data. If the key already exists you will receive an exception and you should handle that properly.
If you're not using a database as a backend but only a DataTable you can still use constraints. See
UniqueConstraint Class[
^]