public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } GenreMovieUpdateDto editedGenreMovie = new GenreMovieUpdateDto(); editedGenreMovie.Id = inputDto.Id; editedGenreMovie.MovieId = inputDto.MovieId; editedGenreMovie.GenreId = inputDto.GenreId; await _genreMovieService.Update(editedGenreMovie); return(RedirectToPage("../User/Index")); }
public async Task <string> Update(GenreMovieUpdateDto item) { await GenreMovieService.Update(item); return($"this {item.Id} has been updated"); }