Replies: 2 comments
-
Hi @JarboeJ , There were some issues in the way input was sent. RulesEngine requires top level object to be passed as ExpandoObject(you are passing list of Object which will not work) Here is a tweaked version of your sample code with where and any working - https://dotnetfiddle.net/KlRHYS |
Beta Was this translation helpful? Give feedback.
0 replies
-
@abbasc52 I think I see it! Thank you for helping me correct my silly mistake. Do you think a validation feature would be warranted to reject inputs like mine with a helpful error? Thanks again, I'm very excited to put RulesEngine to work! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working to understand what I'm doing wrong with sequence operators. This documentation (https://microsoft.github.io/RulesEngine/) says "The lambda expression allows you to use most of C# constructs and along with some of linq features." Is "Any" supported? The behavior I'm getting is really strange. (I've been itereating on this dotnetfiddle, so it's improved, but I'm not able to demonstrate that Any or Where works.
https://dotnetfiddle.net/1Q5Gmz
Edit: to be more specific, i'm seeing a combination of two errors that don't make sense together for my input as far as I can understand:
input1.First().customer.serviceability.groups.Where(g => g.group == "B")
- No property or field 'group' exists in type 'List`1'Exception while parsing expression
input1.First().customer.groups.Any("group == B")
- No applicable method 'Any' exists in type 'Object'If this is not supported, I would like to stop trying to make it work. :)
Beta Was this translation helpful? Give feedback.
All reactions