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

fix DapperExtensions.Get will occur exception when parameter id is no… #321

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

noneiori
Copy link

…t a KeyValuePair (issue #315)

Hi,

According to get-operation,it will get a sinlge object, but I get a exception because wherePredicate this variable return a empty IPredicate,

foreach (var kvp in ReflectionHelper.GetObjectValues(entity).Where(property => notIgnoredColumns.Any(c => c.Name == property.Key)))

And it will fetch whole data while a empty IPredicate,so it would better to add a IPredicate when predicates is empty.

Thank you.

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

Successfully merging this pull request may close these issues.

1 participant