Why is there no Provider() property for the ReadOnlyListBase?

Why is there no Provider() property for the ReadOnlyListBase?

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


slabanum posted on Tuesday, April 08, 2008

Hi Rocky,

Why is the Provider() (which is a CslaQueryProvider) only in BusinessListBase and not in ReadOnlyListBase?

Does it mean that Linq expressions cannot be done on ReadOnlyListBase subclasses/implementations (such as filtering/grouping, etc)?  I am still in the middle of doing upgrades so I haven't played with the new version yet.

I guess I can't wait for the new book which will explain all of this. 

Thanks.

RockfordLhotka replied on Thursday, April 10, 2008

BLB implements a custom query provider in order to modify how projections work, specifically to enable binding on results from Linq to objects queries over BLB.  On the other hand, the nature of ROLB is that, since it is read only, binding from a projection (typically in a read only manner, such as a dropdown) does not require the original collection, hence, no need for a custom query provider.

Copyright (c) Marimer LLC