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

BulkRead: only read certain properties #590

Open
SIT-jekleine opened this issue Jul 13, 2021 · 6 comments
Open

BulkRead: only read certain properties #590

SIT-jekleine opened this issue Jul 13, 2021 · 6 comments

Comments

@SIT-jekleine
Copy link

Is it possible to to only read cetain properties with the BulkRead function? I am trying to find a solution to load a single property based on the Id of the entity.

@borisdj
Copy link
Owner

borisdj commented Jul 13, 2021

You can use PropertiesToInclude or PropertiesToExclude, more info in ReadMe.

@SIT-jekleine
Copy link
Author

SIT-jekleine commented Jul 13, 2021

You can use PropertiesToInclude or PropertiesToExclude, more info in ReadMe.

That is indeed what I was trying to do without any success.
The function call:
image

And the actual sql query being executed where AddressableId shouldn't be included:
image

I am using version 3.6.1 of EFCore.BulkExtensions

@borisdj
Copy link
Owner

borisdj commented Jul 13, 2021

You are correct, only in memory excluded are skipped but from Db it selects all.
Will consider if this could be improved.

@sommmen
Copy link

sommmen commented Jan 5, 2022

Would also love this, useful to reload ids only.

@sommmen
Copy link

sommmen commented Jan 5, 2022

You are correct, only in memory excluded are skipped but from Db it selects all. Will consider if this could be improved.

Perhaps you could give me a quick description of what'd need to be done? I might take a peek if its not too complicated and i have some spare time during the weekends.

@oresttkachukd
Copy link

Is there a chance it was working in version 3.1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants