1

I have a rule such as

When()
  .Match<ObjectA>(a => a.Field1 == "xxx",
                  a => a.Field2 == "yyy",
                  a => a.List1.Where(l => l.Field3 = "111").Count() > 0);

Which returns results

However when I try to add additional conditions to the Where clause e.g.

When()
  .Match<ObjectA>(a => a.Field1 == "xxx",
                  a => a.Field2 == "yyy",
                  a => a.List1.Where(l => l.Field3 == "111" && l.Field4 == "222" ).Count() > 0);

It returns an error saying "Failed to evaluate condition ....."

How do I extend the criteria against the List?

CB1
  • 31
  • 3

1 Answers1

1

Turns out nothing to do with NRules but issue with the condition being added - should have taken more time before posting.

CB1
  • 31
  • 3
  • 1
    Also, in the future, please include the actual contents of the exception, as well as the inner exception, with as much of a stack trace as possible, as that’s where all the interesting information is – Sergiy Nikolayev Sep 23 '20 at 17:39