I have a collection of data
List<Data> data = new List<Data>(){
new Data() {
Column1 = 50,
Column2 = "48148148",
Column3 = "1414141414"
}
}
I can have a thousand records like this in that collection.
Now I have to see if anything in that collection already exists in my database, if so bring back the record to be updated.
I don't want to do a 1000 sql statements all with
where Column1= @param1 and Column2 = @param2 and Column3 = @param3
I really want to do 1 query to get all the records back.
Is there some way I can take my collection I have and built a join statement(maybe an inner join) with it or something.
I seem to remember seeing something where you can do a "select join" or something like that but I can't really remember it totally.