Example #1
0
        public IActionResult Edit(ActorsEditModel edit)
        {
            if (!this.ModelState.IsValid)
            {
                return(this.View());
            }

            this.actorsService.Edit(edit.Id, edit.Name, edit.BirthDate, edit.IMDbUrl, edit.PictureUrl);

            return(this.Redirect("/Admin/Actors/"));
        }
Example #2
0
        public IActionResult Edit(int actorId)
        {
            Actor actor = this.actorsService.GetActor(actorId);

            ActorsEditModel model = new ActorsEditModel
            {
                Id         = actor.Id,
                BirthDate  = actor.BirthDate,
                IMDbUrl    = actor.ImdbUrl,
                Name       = actor.Name,
                PictureUrl = actor.PictureUrl
            };

            return(this.View(model));
        }