mtanneryd / ef-bulk-operations

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

Navigation properties not correctly persisted #10

Closed JPvanMackelenbergh closed 4 years ago

JPvanMackelenbergh commented 5 years ago

First of all, I like your library which seems to solve one of the major issues that exist with Entity Framework. Thanks for the effort !

I have an entity DataEntry which has a collection of DataEntryProperty entities. When I try to bulk insert the DataEntry it will indeed persist the DataEntry and corresponding DataEntryProperty entities, however the column 'DataEntry_Identifier', which is added automatically by EntityFramework, containing the FK relation from the DataEntryProperty to the DataEntry is not stored.

I tried different ways of using the BulkInsert. Also tried attaching the resulted entities within the EF context, but this did not make any difference. When debugging the implementation I was unable to see any reference to the 'DataEntry_Identifier' column being used.

mtanneryd commented 5 years ago

Hi and thanks for your feedback! If you could post the class definitions of your two classes that would be great. Or, send them to me via email at mans@tanneryd.se.

mtanneryd commented 4 years ago

As far as I can tell this has been resolved. Please reopen if you find this not to be true.