EFCore.BulkExtensions icon indicating copy to clipboard operation
EFCore.BulkExtensions copied to clipboard

BulkRead with static BulkConfig only fetches data on first attempt

Open qvsmith opened this issue 4 years ago • 2 comments

Just a question.

While testing BulkRead I noticed that if I use a static BulkConfig it only fetches the data the first time. All successive attempts while app was running resulted in no data being retrieved. I was using the same values to fetch data.

When using a new instance of BulkConfig each time it works as expected.

I was just wondering why this is the case?

qvsmith avatar Oct 07 '21 09:10 qvsmith

For BulkRead PropertiesToInclude is set at one point internally and it remains that way. For the moment you could just reset it to null after each read: bulkConfig.PropertiesToInclude = null; And I'll see later to add reset automatically at method end.

borisdj avatar Oct 07 '21 16:10 borisdj

Ah I see, thanks for the feedback 👍

qvsmith avatar Oct 08 '21 09:10 qvsmith

Fixed

borisdj avatar Apr 26 '23 22:04 borisdj