Example #1
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            ActorMovieUpdateDto actorMovieUpdate = new ActorMovieUpdateDto();

            actorMovieUpdate.Id      = inputDto.id;
            actorMovieUpdate.MovieId = inputDto.MovieId;
            actorMovieUpdate.ActorId = inputDto.ActorId;

            await actorMovieService.Update(actorMovieUpdate);

            return(RedirectToPage("../ActorMovieRazor/Index"));
        }
Example #2
0
        public async Task <string> Update(ActorMovieUpdateDto item)
        {
            await ActorMovieService.Update(item);

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