Can Obtics create "paged" collection views?

Oct 4, 2011 at 5:53 PM

Quick question for you.

I've used Obtics in the past to create a list of view models based on a list of entities.  However, now I'm trying to do it in Silverlight using RIA services and the RIA controls, which support paging.

I'm trying desperately to find a way to expose a pageable list of view models, which are based on a pageable collection view (ICollectionView + IEditableCollectionView + IPagedCollectionView + etc.).  And I'd like to do it in a way that the list of view models also supports paging.  I think the only way is for Obtics to return a collection which supports those interfaces I've listed (plus the obvious ones: IEnumerable, INotifyCollectionChanged, etc...).

So is there a way to get Obtics to return a collection that supports paging?

Oct 13, 2011 at 2:41 PM

In the basis Obtics only supports IEnumerable for collections. There are some extensions (ToList(), ToDictionary()) that transform an (observable) IEnumerable to an (observable, readonly) IList or IDictionary. The ObticsBindingHelper assembly contains some extension methods that allow the creation of mutable IList and IDictionary results.

I guess you will need to create a similar extension to create IPagedCollectionView + etc results. When you have something working it may be a valuable addition to the Obtics code base.