Пример #1
0
        public static Data.Entities.Movie Map(Movie source, Data.Entities.Movie destination)
        {
            destination.Rating       = source.Rating;
            destination.ReleasedYear = source.ReleasedYear;
            destination.Sales        = source.Sales;
            destination.Title        = source.Title;

            return(destination);
        }
Пример #2
0
        public static Movie Map(Data.Entities.Movie source, Movie destination)
        {
            destination.Rating       = source.Rating;
            destination.ReleasedYear = source.ReleasedYear;
            destination.Sales        = source.Sales;
            destination.Title        = source.Title;
            destination.Id           = source.Id;
            destination.Actors       = source.Actors?.Select(a => a.ActorId).ToArray();

            return(destination);
        }
Пример #3
0
        public static Data.Entities.Movie Map(Movie source, Data.Entities.Movie destination)
        {
            destination.Rating       = source.Rating;
            destination.ReleasedYear = source.ReleasedYear;
            destination.Sales        = source.Sales;
            destination.Title        = source.Title;
            destination.Actors       = source.Actors?.Select(id => new ActorMovie
            {
                MovieId = source.Id
            });

            return(destination);
        }
Пример #4
0
 public static Movie Map(Data.Entities.Movie source)
 {
     return(Map(source, new Movie()));
 }