Пример #1
0
        public async Task <IActionResult> OnPost(Guid id)
        {
            if (id == null)
            {
                return(BadRequest());
            }

            await _genreService.DeleteGenreAsync(id);

            return(RedirectToPage("./Genres"));
        }
Пример #2
0
        public async Task <ActionResult <Genre> > DeleteGenre(Guid id)
        {
            var genre = await _genreService.DeleteGenreAsync(id);

            if (genre == null)
            {
                return(NotFound());
            }

            return(genre);
        }