Feature: Add support for querying a IQueryable<dynamic>#137
Feature: Add support for querying a IQueryable<dynamic>#137StefH merged 6 commits intozzzprojects:masterfrom NickDarvey:features/136-get-member-fallbacks-for-dynamic-objects
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
ParseMemberAccessmethod 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_ExpandoObjectstest passes now.Some notes:
objector has an indexer), currently aInvalidOperationExceptionbut perhaps introducing a new exception type is warranted?ExpressionTests_Select_DynamicObjectsbut I'm not sure how I'll go.