Return all existing entities from BulkRead
Hi, This is a suggestion, not an issue. In our project, we needed a function very similar to BulkRead but a version which would return all matching entities. Basically, a method that would under the hood call a copy of the SQL adapter ReadAsync method, skip the tableInfo.UpdateReadEntities and return existingEntities. The BulkRead, in its current implementation, is not really an alternative to using .Contains/IN which will return all entities matching the criteria while BulkRead will only return the first.
Will consider it but I'm not sure how to implement it. Can you write example of what you need to achieve and also if you feel up to it could try to make a PR.
I have this functionality implemented on top of EFCore.BulkExtensions lib. Luckily all the key classes are public. I'll try to make a PR with the proposed changes to the BulkRead operation.
Hi I have the same logic needed and i do same like @JiriRichter and i have a suggestion to make GetDataTable public because i needed with custom logic
This sounds like it would be useful :)
just found this issue. would be great to have this feature
GetDataTable was made public, and will review any PR made regarding this proposal.
PR was merged. BulkConfig now has ReplaceReadEntities.