I have added a rule to the AllDataTypes data structure in the demo project. The rule depends on the Id field. So I expect the rule to be evaluated only when a new row is added.
It is a little confusing that the DataRow parameter rowChanged has the RowState property set tro Unmodified. Maybe the rows that are Unmodified should not trigger the rule…
I guess the rule should be filtered out somewhere around here:
Or maybe there should be some more parameters to this method and the rules should be filtered here?
The problem is not that the rules would run on every row. This would be by design – e.g. after transformation all rules are always evaluated. So all the rules depending on Id field would be re-run.
The issue here is that rules should not be evaluated after loading data from the database as we suppose data in database are consistent.