Hi,
Yes, CSLA 3.5 lists (BusinessListBase and ReadOnlyListBase) implements index for use in "LINQ to Objects" over CSLA lists.
/jonny
I do not recall any code samples of this being posted yet.
Rocky is in the midst of writing the book - I am sure it will be discussed there. But it won't be published til the Fall so...
Joe
All you need to do is put the Indexable attribute on the child object property that should be indexed, everything else is automatic - the index will be built and used if needed.
Please note however, that building an index is not free. It is totally counter-productive to use indexing unless you are doing multiple queries against the same collection.
Also be aware that the current indexing scheme only supports equality operations. So it only helps if your where clause uses an equality check, and only if it just checks that one property.
Finally, be aware that once built, the index is automatically maintained. So if your collection changes frequently (new items, deleted items, edited items) that will cause the index to be rebuilt each time.
What this means is that indexed collections are best used for read only lists, where you load a large list and cache it so the data can be used many times over the life of the application. And it is only useful if you are doing single-property equality checks in your where clause.
Copyright (c) Marimer LLC