/***************** * UPDATE */ public IActionResult Edit(int galleryId) { GalleryEntity entity = galleryRepository.FindById(galleryId); GalleryEditorViewModel viewModel = new GalleryEditorViewModel(entity.Id, entity.Label); return(View("Editor", viewModel)); }
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)); }