Business Rules /w VAB

Topics: Validation Application Block
Mar 6, 2007 at 6:37 PM
Edited Mar 6, 2007 at 6:37 PM
Does it make any sense at all to insert business rules/logic inside of self-validating methods of an entity object?

For example:

HasSelfValidation
public class MyBusinessObject
{
double acctBalance = -500.00;

HasSelfValidation
Public void CheckAcctBalance(ValidationResults results)
{
If (acctBalance < 0)
results.AddResult(new ValidationResult(“Account balance is the red”, this, null, null, null));
}
}

Any advice is greatly appreciated. Thanks.