public override void Define() { FactType fact = null; When() .Match <FactType>(() => fact, f => f.TestProperty.StartsWith("Valid"), f => f.TestCount <= 2); Then() .Do(ctx => fact.IncrementCount()) .Do(ctx => ctx.Update(fact)); }