Newbie Questions Of CSLA

Newbie Questions Of CSLA

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


st3fanus posted on Sunday, August 30, 2009

Hello I'm stefanus

Can anyone give me a confirmation or reasoning probably about :

There are several SetProperty methods in BusinessBase.
There is one that check validation and any other doesn't check validation..?

And then if That is true.. How does it different with LoadProperty() ??

Thanks a lot..


Stefanus


Lalit replied on Monday, August 31, 2009

Hi stefanus,
Actually after setting your property you sometimes needs to check if its new value is valid. In such scenarios you checks validation against that property otherwise you do not.
In case of LoadProperty() you returns the value of your property, which does not breaks your object's validation. Hence there is no need to check validations in LoadProperty()

Copyright (c) Marimer LLC