mardi 3 novembre 2020

How to generate 7 digit unique string (include 0-9 number) in c#

I want to generate 7 digit unique string include 0-9 number for each new record saved into my database, I found THIS solution but I'm still wonder about how can I be sure that the string are not duplicated in the database?

Should I compare each new one with the all others saved in database or there's a better solution?




Aucun commentaire:

Enregistrer un commentaire