public async Task <IActionResult> Index(int Id)
        {
            var artwork             = ArtRepository.GetArtworkForUser(Id);
            var allArtworksFromUser = await ArtRepository.GetPostedArtFromUniqueUser(artwork.Member);

            artworkDetailViewModel = new ArtworkDetailViewModel(allArtworksFromUser, artwork, artwork.Member);
            return(View(artworkDetailViewModel));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> DeleteArtConfirm(int Id)
        {
            try
            {
                Artwork artwork = ArtRepository.GetArtworkForUser(Id);
                await ArtRepository.DeleteArtworkFromArtworkTable(_hostEnvironment, artwork);

                return(Json(Id));
            }
            catch (Exception ex)
            {
                return(View(ex));
            }
        }