mtanneryd / ef-bulk-operations

Bulk operations for Entity Framework 6
Apache License 2.0
80 stars 30 forks source link

fix for issue #23 (BulkSelectNotExisting) #29

Closed hzahradnik closed 4 years ago

hzahradnik commented 4 years ago

I am currently optimizing a batch operation, which currently has, thanks to EF, a high number of queries against the database. Your library has already helped to reduce the UPDATE queries, but it failed after I tried to replace the INSERT queries with BulkInsertAll. I debugged your code and came to the conclusion, that the problem has to be the different names of the primary key in the database respectively the EF model and the use of BulkSelectNotExisting. Therefore, I guess it is a consequential error of #23.

The fix itself is quite simple, if I understand your code correctly. Additionally, I added a new context, which represents a simplistic view on my DB model, and added a corresponding test case to each of BulkInsertAll and BulkSelectNotExisting.

Hope this is helpful.

hzahradnik commented 4 years ago

Works for us with the latest version. The PR is therefore obsolete.

Thank you. 👍

mtanneryd commented 4 years ago

Happy to hear it is working well for you! Thanks for all the feedback.

/MĂ„ns

MÄns TÄnneryd TÄnneryd IT AB BarrskogsvÀgen 19 186 53 Vallentuna +46-705140093 https://se.linkedin.com/in/manstanneryd

https://github.com/mtanneryd/ef6-bulk-operations https://github.com/mtanneryd/ef6-bulk-operations

Den tis 18 aug. 2020 kl 16:41 skrev hzahradnik notifications@github.com:

Works for us with the latest version. The PR is therefore obsolete.

Thank you. 👍

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mtanneryd/ef6-bulk-operations/pull/29#issuecomment-675508938, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2BSRNRIF7KLLS75VRPEHLSBKFE5ANCNFSM4KPXBPSA .