Csla 4 and collection rules

Csla 4 and collection rules

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

ajj3085 posted on Monday, October 04, 2010


I was wondering if there is any standard support regarding adding or removing items from a collection in Csla based on business rules.  I know the usual answer is to override InsertItem and RemoveItem, but I thought I'd ask again given the new rules subsystem, and that this seems like a fairly common use case.

Is there any way to have a rule determine if Insert / Remove should throw an exception or allow the operation?



RockfordLhotka replied on Monday, October 04, 2010

No, there is no formal rule concept in BLB.

Russ replied on Tuesday, October 05, 2010

You could wrap your Business List  or Read Only List object in a Business object and write your business rules there.

Copyright (c) Marimer LLC