Пример #1
0
        public ActionResult Update(int?id)
        {
            var actorMovie = _actorMovieService.Get(id.GetValueOrDefault());
            var model      = Mapper.Map <ActorMovieViewModel>(actorMovie);

            model.MovieSelectList = GetRelatedEntitiesList();

            return(View("CreateOrUpdate", model));
        }
Пример #2
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            tempActorMovie = await _actorMovieService.Get(id);

            if (tempActorMovie == null)
            {
                return(RedirectToPage("/NotFound"));
            }

            return(Page());
        }
Пример #3
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            actorMovieDetail = await _actorMovieService.Get(id.Value);

            if (actorMovieDetail == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Пример #4
0
 public Task <ActorMovieOutputDto> Get(int id)
 {
     return(ActorMovieService.Get(id));
 }