You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-2Lines changed: 19 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,12 +30,29 @@ int c = 10;
30
30
db.Customers.WhereInterpolated($"City == {cityName} and Orders.Count >= {c}");
31
31
```
32
32
33
+
## :exclamation: Breaking changes
34
+
35
+
### v1.3.0
36
+
A breaking change is introduced in version 1.3.0 which is related to calling methods on classes.
37
+
Due to security reasons, it's now only allowed to call methods on the standard predefined classes like (`bool`, `int`, `string` ...).
38
+
If you want to call a method on an own custom class, annotate that class with the [DynamicLinqType](https://dynamic-linq.net/advanced-extending#dynamiclinqtype-attribute).
39
+
Example:
40
+
```c#
41
+
[DynamicLinqType]
42
+
publicclassMyCustomClass
43
+
{
44
+
publicintGetAge(intx) =>x;
45
+
}
46
+
```
47
+
48
+
If it's not possible to add that attribute, you need to implement a custom [CustomTypeProvider](https://dynamic-linq.net/advanced-configuration#customtypeprovider) and set this to the `ParsingConfig` and provide that config to the dynamic call.
0 commit comments