CSLA .NET 2.1.1 available for download

CSLA .NET 2.1.1 available for download

Old forum URL: forums.lhotka.net/forums/t/1781.aspx


RockfordLhotka posted on Thursday, November 16, 2006

CSLA .NET 2.1.1 is now available for download from the download page. This is a bug fix release, which addresses some issues in version 2.1. See the change log for details.

William replied on Sunday, November 19, 2006

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

 

RockfordLhotka replied on Sunday, November 19, 2006

Was your code working in 2.1 and is now failing in 2.1.1, or is this new code in 2.1.1?
 
I ask, because I have existing code upgraded from 2.1 to 2.1.1 that is working fine, and I'm trying to narrow down whether you've successfully used dependant properties up to this point?
 
Also, are we talking VB or C#?
 
Rocky
 


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 download

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

 




William replied on Sunday, November 19, 2006

Hi Rocky,
 
I attempted AddDependentProperty back in 2.1, it failed and I didn't use it. I found a post in this forum that this feature has some issues which is going to be fixed in the next release.
 
Later, I attempted the AddDependentProperty with the latest 2.1.1 and it failed too for the behavior I described.
 
I am using the C# version.
 
Thanks.
William

William replied on Sunday, November 19, 2006

Additional information.
 
When I was attempting AddDependentProperty (which failed), I have both per-type and per-instance rules in my business object. Then, I converted all my rules to per-type and it didn't work either.
 
Regards,
William

RockfordLhotka replied on Tuesday, November 21, 2006

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