Is It possible to add property status to properties without business rules?

Is It possible to add property status to properties without business rules?

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


roydanielsw posted on Tuesday, July 01, 2014

I have created property status control for my Model property. When I removed the business rules of the corresponding properties from AddBusinessValidationRules(). It is not working.

 

Is it mandatory a business rule for showing propertystatus . Else some settings is available?

Please confirm

JonnyBee replied on Wednesday, July 02, 2014

Hi,

Basically - you would then be on your own and should override the default IDataErrorInfo/INotifyDateErrorInfo implementation in CSLA (and can not benefit from the CSLA implemented additions of Warning/Info level).

The rule system in CSLA maintains a BrokenRulesCollection and this is the datasource used to provide error/warn/Info messages to the user. You should NOT try to maintain this yourself or add messages in other ways (and there should be no methods in the framework for you to interact with this collection).

So to use the default provided rule engine you must use BusinessRules and the builtin RuleEngine.

 

Copyright (c) Marimer LLC