コード例 #1
0
        /*****************
         * UPDATE
         */
        public IActionResult Edit(int galleryId)
        {
            GalleryEntity          entity    = galleryRepository.FindById(galleryId);
            GalleryEditorViewModel viewModel = new GalleryEditorViewModel(entity.Id, entity.Label);

            return(View("Editor", viewModel));
        }
コード例 #2
0
        public IActionResult Index(int galleryId)
        {
            GalleryEntity      galleryEntity = galleryRepository.FindById(galleryId);
            List <ImageEntity> imageEntities = imageRepository.FindAllByGalleryId(galleryId);
            GalleryViewModel   viewModel     = new GalleryViewModel(galleryEntity, imageEntities);

            return(View("Index", viewModel));
        }