Im am trying to bring back an ImageCollection which is filtered by one or more Tag and ordered by the number of Visits. Currently I am attempting to use the Query system to do this. However, there does not seem to be a VisitableItemCriterion to sort the items by.
Can anyone offer some advice for the best approach to achieve this?
Here is an example about get most viewed image, not by using Query, but it seems to be a good idea.
// Get the most viewed images
EntityCollection visitedItems = VisitHandler.Instance.GetVisitedItems(typeof(ImageGallery), EntityStatus.Approved,
page, ucImageGalleries.PageSize, Utils.CacheTimeOut.MostViewed, out totalItems,
new VisitableEntitySortOrder(VisitableEntitySortField.NumVisits, SortingDirection.Descending));
ImageGalleryCollection imageGalleries = new ImageGalleryCollection();
// Transform into an image gallery collection
foreach (ImageGallery ig in visitedItems)
Hope this could help!