public async Task <IActionResult> OnPostAsync() { int deletedGenre = await _genreMovieService.Delete(genreMovieDLT.Id); if (deletedGenre == 0) { return(NotFound()); } return(RedirectToPage("Index")); }
public async Task <int> Delete(int id) { await GenreMovieService.Delete(id); return(id); }