I downloaded version 2.1.1 for my project. When I use AddDependantProperty() in AddBusinessRules(), suddenly all my business rules get ignored and IsValid always returns True for a newly created business object. All my business rules work ok after I removed all AddDependentProperty calls and use PropertyHasChanged method in the respective property setters.
Is there any steps I need to do in order to use AddDependentProperty()?
Regards,
William
From: William [mailto:cslanet@lhotka.net]
Sent: Sunday, November 19, 2006 8:29 AM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] CSLA .NET 2.1.1 available for downloadI downloaded version 2.1.1 for my project. When I use AddDependantProperty() in AddBusinessRules(), suddenly all my business rules get ignored and IsValid always returns True for a newly created business object. All my business rules work ok after I removed all AddDependentProperty calls and use PropertyHasChanged method in the respective property setters.
Is there any steps I need to do in order to use AddDependentProperty()?
Regards,
William
Still it should work. The mechanism is very simple - you make one property dependant on another, and so when the primary properties rules are checked (through PropertyHasChanged() or ValidationRules.CheckRules("prop")) the dependant property is checked too.
Can you post your AddBusinessRules() code?
Copyright (c) Marimer LLC