npgsql/EntityFramework6.Npgsql

Problem with Bulk operation under net472

Prutenskiy opened this issue · 3 comments

I have app witch configured as net472;netcoreapp3.1
I use Npgsql 4.*(try any vertions) for work with DB
INSERT\UPDATE worked fine, but when I try use bulk operation then on start app under net472 have this exception
"Void Npgsql.Bulk.NpgsqlBulkUploader..ctor(Microsoft.EntityFrameworkCore.DbContext)".

For bulk operation I try like this:
using (var ctx = new MyContext(NpgsqlDbContextOptionsExtensions.UseNpgsql(new DbContextOptionsBuilder(), _connectionStr).Options))
{
var d = new List();

            var uploader = new NpgsqlBulkUploader(ctx);
            uploader.Insert(d, Npgsql.Bulk.InsertConflictAction.Update<UserByRole>(........));
        }

Have any some advise?

Emill commented

Hi. Could you please post the full stack trace and exception.

Also maybe https://github.com/neisbut/Npgsql.Bulk would be a better place to file this issue.

Call stack:
at PGTestCommand.Test.Run() in C:...\Program.cs:line 45
at PGTestCommand.Program.Main(String[] args) in C:...\Program.cs:line 13

Exception Message:
Method not finde: "Void Npgsql.Bulk.NpgsqlBulkUploader..ctor(Microsoft.EntityFrameworkCore.DbContext)".

This problem only when start app under NET472. Same code under core work fine.

You meen move issue in other repo?

transfer to other repo neisbut/Npgsql.Bulk#62