Hi
Using CSLA 3.5.1. I the following object tree:
Invoice (Root)
InvoiceLineList (EditableList)
InvoiceLine (EditableChild)
InvoiceLine has a property of type bool called IsMainLine.I need to write a simple rule that ensures that one and only one main line exit for each invoice. So I wrote the following:
In Inoivce.AddBusinessRules():
ValidationRules.AddRule<Invoice>(PrimaryLineRequired<Invoice>, InvoiceLinesProperty);
And have implemented PrimaryLineRequired. InvoiceLinesProperty is registered fine so on save the list is dirty. Yet the rule never fires... I expected that when IsMainLine changes (or any property in any InvoiceLine in InvliceLineList) that the above rue would fire.
Any ideas?
Copyright (c) Marimer LLC