I am using a business object as search criteria within the client. I want at least one property to be supplied by the user before they can perform a search. I have a search button (IsEnabled) that is bound to the IsValid property of the business object.
Is there a good example of how to require that at least one property is supplied in order for it to be valid?
Which version of CSLA?
If all you care about is having IsValid be false, I'd create an object-level business rule (a rule not attached to a specfic property) that checks to see if at least one property has a value. Then in OnPropertyChanged call BusinessRules.CheckObjectRules to run this rule every time a property changes.
protected override void OnPropertyChanged(string name)
Copyright (c) Marimer LLC