Example #1
0
        /// <summary>
        /// Retrieves Galleries with photos only.
        /// </summary>
        /// <returns></returns>
        public List <Gallery> RetrieveGalleriesWithPhotos()
        {
            List <Gallery> galleriesWithPhotos = new List <Gallery>();
            List <Gallery> allGalleries        = _resource.RetrieveAllGalleriesWithPhotoCount();

            //filter out the galleries with out images
            foreach (Gallery gallery in allGalleries)
            {
                if (gallery.PhotoCount > 0)
                {
                    galleriesWithPhotos.Add(gallery);
                }
            }

            return(galleriesWithPhotos);
        }