Table entity column is unique, and I’m trying to add items. Items amount is fairly big, so i’m trying to avoid connecting to a database many times. What is the best way to ignore duplicates?
Example: code
Edit: Problem was word1 was of type nchar(50), so after changing it to nvarchar(50) everything worked.
It sounds like you want to avoid inserting those words that are already in the table.
Your code, as you have it today, will send all the
INSERTSone after each other, in the same batch. It’ll create a single connection for them all with the oneSubmitChanges()that you have.