Пример #1
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Album = await _album.GetAlbumByIdAsync(id);

            if (Album != null)
            {
                await _album.DeleteAlbumAsync(id);
            }

            return(RedirectToPage("./Index"));
        }