0

We've been using Dapper Plus to do bulk merges using BulkMerge against SQL Server. This works pretty easily with an identity column but we've got many tables that have a primary key with no identity seed. Is it possible to use BulkMerge with no identity.

We've seen the example to do it with BulkInsert https://dotnetfiddle.net/qBhy2a . So I'm thinking maybe it needs to be done with an BulkInsert / BulkUpdate combo instead.

1
  • FYI, I've seen this example of BulkMerge with no identity, dotnetfiddle.net/FZ5wOz, but it throws an error Violation of PRIMARY KEY constraint. Makes sense just thought Dapper would handle the upsert. Commented May 1, 2024 at 22:29

1 Answer 1

0

So my bad, the BulkMerge did work using the example https://dotnetfiddle.net/FZ5wOz . I didn't double check my data on the list I was using.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.