You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm new to NRules so bear with me, but I'm somehow missing how to access the previous value of an attribute. Say I want to define a rule that only should fire if Status specifically has changed from "Processing" to "Done".
public class MyObject
{
public int Id { get; set; }
public string Status { get; set; }
}
public class ObjectNameChangedRule : Rule
{
public override void Define()
{
MyObject myObj = null;
When()
.Match(() => myObj , o => myObj.Status == "Done")
// match oldObject.Status to "Processing" ?
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I'm new to NRules so bear with me, but I'm somehow missing how to access the previous value of an attribute. Say I want to define a rule that only should fire if Status specifically has changed from "Processing" to "Done".
Beta Was this translation helpful? Give feedback.
All reactions