0

Would like to know if the rule editor supports keywords like: GROUPBY, SUM, AVG, JOIN multiple datatables on Conditions. Integration with Entity framework.

Thanks.

1 Answers1

0

You are mixing several features in a single question.

If you asking about the Rule-based Data Filtering feature of CodeEffects engine then yes, all that is supported.

In general, CodeEffects supports any LINQ provider as long as it implements a meaning of "where" clause. For example, you can use our Filter extension method in your EF statement to query a table or a view in your database like this:

var data = yourIQueryable.Filter(yourRuleXmlString).GroupBy(...).Sum(...).Select(...);

Details on Data Filtering in CodeEffects can be found here.

If you need to use any aggregation in your business rules, you can use in-rule methods or rule actions to do that. For example, suppose your source object declares a List<Country> collection called Countries and a generic method Count that returns the items count:

public List<Country> Countries { get; set; }

Method(["Get Count"])
public int Count<T>(List<T> list) { return list.Count; }

Having those in your source, you can use CodeEffects to create a rule like this:

If Get Count( Countries ) is greater than [2] then ...

Details on in-rule methods and actions can be found here, here and here.

Alex
  • 566
  • 1
  • 6
  • 14