コード例 #1
0
        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"));
        }
コード例 #2
0
        public async Task <string> Update(GenreMovieUpdateDto item)
        {
            await GenreMovieService.Update(item);

            return($"this {item.Id} has been updated");
        }