Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with bulk operation #62

Open
Prutenskiy opened this issue Apr 30, 2021 · 1 comment
Open

Problem with bulk operation #62

Prutenskiy opened this issue Apr 30, 2021 · 1 comment

Comments

@Prutenskiy
Copy link

Prutenskiy commented Apr 30, 2021

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>(........));
    }

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.

Have any some advise?

P.S. I download master, build project (only build Npgsql.Bulk), connect Npgsql.Bulk.dll to my test app and run. Evrething work in both mode(core and net). Maybe some problem in nuget packages?

@neisbut
Copy link
Owner

neisbut commented Dec 10, 2021

Hi @Prutenskiy , I update package today, please try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants