CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

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

rated by 0 users
Answered (Verified) This post has 1 verified answer | 2 Replies | 1 Follower

Top 50 Contributor
184 Posts
JCardina posted on Fri, Mar 9 2012 2:07 PM

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

 

Answered (Verified) Verified Answer

Top 10 Contributor
1,770 Posts
Verified by JCardina

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.

Jonny Bekkum, Norway CslaContrib Coordinator

All Replies

Top 10 Contributor
1,770 Posts
Verified by JCardina

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.

Jonny Bekkum, Norway CslaContrib Coordinator

Top 50 Contributor
184 Posts

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.

Page 1 of 1 (3 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems