Here Mudassar Ahmed Khan has explained how to perform Bulk Insert records and Update existing rows if record exists using C# and VB.Net.
SqlBulkCopy as the name suggest is for copying (inserting) bulk records and it cannot perform update operation. Hence comes Table Valued Parameter to the rescue, which allows us to pass multiple records using a DataTable to a Stored Procedure where we can do the processing.
↧