You can try to use in ICollection. This should work with
both ReadOnlyBLB and BLB.
Sergey Barskiy
Senior Consultant
office: 678.405.0687 |
mobile: 404.388.1899
Magenic ®
Microsoft Worldwide Partner of the Year | Custom
Development Solutions, Technical Innovation
From: adamnationx
[mailto:cslanet@lhotka.net]
Sent: Tuesday, July 01, 2008 2:41 PM
To: Sergey Barskiy
Subject: [CSLA .NET] Validating that a generic list contains at least
one item
Hey guys,
Just started working with CSLA recently on a DB management app. It's definitely
making my life easier in many ways, but I ran into a problem this morning when
I started implementing some custom validation rules. Hopefully somebody has
some advice for me!
I want to implement a rule that ensures that a generic list object contains at
least one item (list.Count > 0). I am implementing this rule as part of an
"Order" object which has a member "OrderItems" collection,
but I'd like the business rule to accept generic lists. I was playing around
with passing the type to the rule, but I'm not super well-versed in generics
and certainly not with CSLA business rules. Any help would be greatly
appreciated!
Thanks,
Adam
Copyright (c) Marimer LLC