示例#1
0
文件: Gallery.cs 项目: agsyazilim/Ags
        public IViewComponentResult Invoke()
        {
            var model       = new List <PhotoGalleryModel>();
            var galleryList = _galleryService.GetGalleryMappingList().Where(x => x.Gallery.Name != "InstagtamGaleri");

            foreach (var gallery in galleryList)
            {
                model.Add(_galleryFactory.PreParePhotoGalleryModel(new PhotoGalleryModel(), gallery));
            }
            return(View(model));
        }
示例#2
0
        public List <PhotoGalleryModel> PreParePhotoGalleryListModel(int photoGallery)
        {
            if (photoGallery == 0)
            {
                return(new List <PhotoGalleryModel>());
            }
            var query = _galleryService.GetGalleryMappingList(photoGallery);
            var model = new List <PhotoGalleryModel>();

            foreach (var photoGalleryMapping in query)
            {
                model.Add(PreParePhotoGalleryModel(new PhotoGalleryModel(), photoGalleryMapping));
            }
            return(model);
        }