I have a list of entities and I want to insert them into a database. If the entity already exists in the database as is then it needs to be skipped. If its in the database b
Create a temp table: SqlCommand(string.Format("SELECT TOP 0 * INTO {0} FROM {1}...
Bulk insert data into it -- Entity Framework Extended mentioned above would need to be tweaked to support the temp table name but otherwise is on the right track -- or roll a bit of code and use SqlBulkCopy.
Construct a MERGE statement.
If you mine a property list you can make (2) and (3) generic. I can read and merge 150,000 rows in about 20 seconds.