Dapper-Extensions
Dapper-Extensions copied to clipboard
fix DapperExtensions.Get will occur exception when parameter id is no…
…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.