Ejemplo n.º 1
0
        /// <summary>
        /// Extract data
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public static SeanceDto Extract(Seance entity)
        {
            var dto = new SeanceDto();

            if (entity == null)
            {
                return(dto);
            }

            dto.Id    = entity.Id;
            dto.Date  = entity.Date;
            dto.Price = entity.Price;

            if (entity.Movie != null)
            {
                dto.Movie = MovieDto.Extract(entity.Movie);
            }

            return(dto);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Extract entity data
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public static MovieDto Extract(Movie entity)
        {
            var dto = new MovieDto();

            if (entity == null)
            {
                return(dto);
            }

            dto.Id          = entity.Id;
            dto.Name        = entity.Name;
            dto.ReleaseDate = entity.ReleaseDate;
            dto.TimeLength  = entity.TimeLength;
            dto.PG          = entity.PG;
            dto.Real        = FullNameDto.ParseString(entity.Real);
            dto.Actors      = FullNameDto.ParseString(entity.Actors);
            dto.Image       = entity.Image;

            dto.Synopsis = entity.Synopsis;

            return(dto);
        }