-
-
Notifications
You must be signed in to change notification settings - Fork 24
DynamicLinq
Stef Heyenrath edited this page Mar 1, 2023
·
10 revisions
These block helpers use System.Linq.Dynamic.Core.
- DynamicLinq.Expression v1
- Linq / DynamicLinq.Expression v2
- All
- . . .
- DynamicLinq.FirstOrDefault
- ...
- DynamicLinq.Where
| Summary | Execute an expression |
| Returns | Result from the expression |
| Parameters | |
| expression | The dynamic expression to execute |
Context N/A
Usage
{{Expression '1 + 2'}}Returns
3
| Summary | Execute an dynamic expression on an object |
| Returns | Result from the expression |
| Parameters | |
| object | The source object |
| expression | The dynamic expression to execute |
Context
{
"modifyDate": "2012-04-23T18:25:43.511Z"
}Usage
{{Expression modifyDate 'AddYears(1)'}}Returns
2013-04-23T18:25:43.511Z
| Returns | Returns the first element of a sequence, or a default value if no element is found. |
| Parameters | |
| object | The source object |
| expression | The dynamic linq predicate (optional) |
Context
{
"data": [
"stef",
"test",
"other"
]
}Usage
{{DynamicLinq.FirstOrDefault data 'Contains("e")'}}Returns
"stef"
| Returns | Filters a sequence of values based on a predicate. |
| Parameters | |
| object | The source object |
| expression | The dynamic linq predicate (optional) |
Context
{
"data": [
"stef",
"test",
"other"
]
}Usage
{{DynamicLinq.Where data 'Contains("e")'}}Returns
"stef", "test"