Esempio n. 1
0
        // 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);
        }
Esempio n. 3
0
        public override void Update(Film t)
        {
            Film entity = _entities.Single(f => f.Id.Equals(t.Id));

            entity.Copy(t);
        }