예제 #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);
        }