Relative Content

Tag Archive for c#dapper-plus

Migrating Database Using Bulk Insert

I am writing a console application to migrate an application’s data from SQLite to SQL server. I installed the Dapper Plus package to try and speed up the transfer of data from one to the other. The issue I’m running into is, I want the primary keys to transfer with each table so that all database relationships remain intact. However, when I use the BulkInsert operation, it just uses the autogenerated identity (1, 2, 3, etc.).