November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi Valdis,
It looks like you've got two solutions. Either the one you've posted above, or by creating a query:
ImageQuery imageQuery = new ImageQuery();
imageQuery.ImageGallery = new ImageGalleryCriterion();
imageQuery.ImageGallery.ID = new IntegerCriterion();
imageQuery.ImageGallery.ID.Value = CurrentImageGallery.ID;
ImageCollection images = QueryHandler.Instance.GetQueryResult<Image, ImageCollection>(imageQuery, 1, 1);
I would probably go for your solution as the GetImages method uses ImageGalleryFactory directly (instead of the QueryFactory), and from a performance point of view it probably has its upsides.
I find it a bit strange that there isn't an overload for the GetImages method that accepts an ImageGallery instead of an ImageGalleryCollection, but I'm sure there's a good reason for it :)
Hope this helps!
Karoline