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

Issue with efcore 6 missing method FindEntityType #70

Open
martea opened this issue Feb 1, 2022 · 4 comments
Open

Issue with efcore 6 missing method FindEntityType #70

martea opened this issue Feb 1, 2022 · 4 comments

Comments

@martea
Copy link

martea commented Feb 1, 2022

nice package but ran into some issues with dotnet6

narrowed it down to this part
https://github.com/neisbut/Npgsql.Bulk/blob/master/src/Npgsql.Bulk/NpgsqlHelper.cs#L144

IObjectContextAdapter think that is depricated in the latest version

Exception thrown: 'System.MissingMethodException' in System.Private.CoreLib.dll: 'Method not found: 'Microsoft.EntityFrameworkCore.Metadata.IEntityType Microsoft.EntityFrameworkCore.ModelExtensions.FindEntityType(Microsoft.EntityFrameworkCore.Metadata.IModel, System.Type)'.'
at Npgsql.Bulk.NpgsqlHelper.GetTableSchema(DbContext context, Type t)
at Npgsql.Bulk.NpgsqlBulkUploader.GetEntityInfoT
at Npgsql.Bulk.NpgsqlBulkUploader.d__40`1.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task).

@Colt2205
Copy link

I'm having the same issue when moving to .NET 6. Still trying to find a work around to it.

@msigle
Copy link

msigle commented May 19, 2022

Same issue. Has anyone found a way to make it work? Maybe we should work on a fork or a PR or something?

@adisadi
Copy link

adisadi commented May 25, 2022

current source works, the nuget is outdated...

@Colt2205
Copy link

Colt2205 commented May 27, 2022

Yeah that makes sense. I ended up swapping to a different strategy using some alternative packages. The package I ended up using was PgPartner and using that to map the entity, then control the total entries inserted per cycle through a foreach loop.

https://www.nuget.org/packages/PgPartner/1.1.0

In case anyone needs an alternative and doesn't want to deal with building source code. For my own implementation the performance is close to identical.

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

4 participants