-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Feature: Add support for querying a IQueryable<dynamic> #137
Feature: Add support for querying a IQueryable<dynamic> #137
Conversation
If it can't get the property or field, try getting the member by a dynamic operation or by an indexer operation.
Sweet CI! Okay, will take a look at which platform is dying... |
Oh, also tagging #136 |
Ah, okay, it's failing to build What do you think about changing the test project to target |
I'll take your PR and take a look. |
Codecov Report
@@ Coverage Diff @@
## master #137 +/- ##
==========================================
- Coverage 82.95% 82.54% -0.41%
==========================================
Files 35 36 +1
Lines 3484 3512 +28
Branches 486 487 +1
==========================================
+ Hits 2890 2899 +9
- Misses 455 481 +26
+ Partials 139 132 -7
Continue to review full report at Codecov.
|
Alright, |
I will merge this code (at this point) to main and create a new NuGet. The discussion on other possible solutions will be done into the issue #136. |
Updates the
ParseMemberAccess
method so that if it can't get the property or field, it tries getting the member by a dynamic operation or by an indexer operation.After a lot of searching I ended up on this bit of code which seems to do the trick. The
ExpressionTests_Select_ExpandoObjects
test passes now.Some notes:
object
or has an indexer), currently aInvalidOperationException
but perhaps introducing a new exception type is warranted?ExpressionTests_Select_DynamicObjects
but I'm not sure how I'll go.