Tell me I'm wrong: there's no need to call Base.AddBusinessRules if you aren't using DataAnnotation validation attributes.

Tell me I'm wrong: there's no need to call Base.AddBusinessRules if you aren't using DataAnnotation validation attributes.

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


JCardina posted on Friday, March 09, 2012

It doesn't appear to be necessary and surely it's better to not call it if not using DataAnnotations for performance.

 

JonnyBee replied on Friday, March 09, 2012

I'd rather keep it to follow the pattern. It may be used for more in future versions of CSLA.

And I'd doesn't cost much in performance as AddBusinessRules is only called once per type of business object.

JCardina replied on Friday, March 09, 2012

Thanks Jonny.  I a big fan of the "YAGNI" principle of development.

If it turns out I need it in future I'll add it when the time comes.

Copyright (c) Marimer LLC