I have been using this library and got stuck with this issue.
When querying a database table using EFCore,
DbSet.Include does not seem to work
Below is sample entity/table structure
Entity Parent
{
string id
string name
Entity child
}
Entity Child
{
string id
string parentId
string role
}
parentDbSet = "DbSet"
Expression: "parentDbSet.Include(i=>i.Child)"
Fails with the error
no applicable aggregate method 'include(Child)' exists"
Can please let know, if the rule engine does support EntityFrameworkQueryableExtensions methods
PS: I tried to pass the Child Entity and EntityFrameworkQueryableExtensions as RESettings, no luck either
var reSettingsWithCustomTypes = new ReSettings { CustomTypes = new Type[] { typeof(Child), typeof(EntityFrameworkQueryableExtensions) } };
var rulesEngine = new RulesEngine.RulesEngine(workflow.ToArray(), reSettingsWithCustomTypes);
var rp1 = new RuleParameter("parentDbSet", parentDbSet);
List response = await rulesEngine.ExecuteAllRulesAsync("workflow", rp1);
Hello,
I have been using this library and got stuck with this issue. When querying a database table using EFCore, DbSet.Include does not seem to work
Below is sample entity/table structure Entity Parent { string id string name Entity child }
Entity Child { string id string parentId string role }
parentDbSet = "DbSet"
Expression: "parentDbSet.Include(i=>i.Child)"
Fails with the error no applicable aggregate method 'include(Child)' exists"
Can please let know, if the rule engine does support EntityFrameworkQueryableExtensions methods
PS: I tried to pass the Child Entity and EntityFrameworkQueryableExtensions as RESettings, no luck either
var reSettingsWithCustomTypes = new ReSettings { CustomTypes = new Type[] { typeof(Child), typeof(EntityFrameworkQueryableExtensions) } }; var rulesEngine = new RulesEngine.RulesEngine(workflow.ToArray(), reSettingsWithCustomTypes);
var rp1 = new RuleParameter("parentDbSet", parentDbSet); List response = await rulesEngine.ExecuteAllRulesAsync("workflow", rp1);