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/")); }
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)); }