Bulk Insert in PostgreSql using c#

Viewed 33

I am trying to save List of Employees in PostgreSql.

What would be the efficient way of doing it ? I know SqlBulkCopy /AddRange is used in SQL for similar approach but I would like to know in PostgreSql c#.

I am looking for both insert and update option.

I referred the below link as suggested by @Palle Due.

I used the approach of Copy , but Copy works great in case of Insert but how to handle update that is if record is already exist into the database.

What's the fastest way to do a bulk insert into Postgres?

0 Answers
Related