public IActionResult AddFilm([FromBody] FilmModel filmModel) { var film = _filmService.AddFilm( FilmModel.To(filmModel), filmModel.Director, filmModel.Playwriter, filmModel.Actors, filmModel.Genres, filmModel.Awards ); return(new ObjectResult(_filmService.GetFilmView(film))); }
public IActionResult FilmView(long id) { var filmModel = _filmService.GetFilmView(id); return(View(new FilmViewModel { Film = filmModel, FilmPerformance = _filmService.GetFilmPerformance(id, GetUserId()) })); }