// Helper method private static FilmDetailModel CreateFilmDetailModel(Film film) { var model = film.Copy <Film, FilmDetailModel>(); if (film.FilmImage != null) { model.FilmImageId = film.FilmImage.FilmImageId; } return(model); }
public static FilmDetailModel CreateFilmDetailModel(Film film) { var model = film.Copy <Film, FilmDetailModel>(); if (film.FilmImage != null) { //model.FilmImageId = film.FilmImage.FilmImageId; model = film.FilmImage.FilmImageId; } return((FilmDetailModel)model); }
public override void Update(Film t) { Film entity = _entities.Single(f => f.Id.Equals(t.Id)); entity.Copy(t); }