/// <summary> /// Creates a new CinemaMovieProjectionsOutputModel from the list of cinemaprojections /// </summary> /// <param name="cinemaProjections"></param> public CinemaMovieProjectionsOutputModel(CinemaProjections cinemaProjections) { //TODO check this for output consistency this.cinema = new CinemaOutputModel(cinemaProjections.Cinema); this.projections = cinemaProjections.MovieProjections.Aggregate( new MovieProjections(), (current, next) => current.addProjections(next.Projections)) .Projections.Select <Projection, ProjectionOutputModel>(i => new ProjectionOutputModel(i)); }
/// <summary> /// Don't use this, please, this is only to create the preview of the response /// </summary> public CinemaMovieProjectionsOutputModel() { this.cinema = new CinemaOutputModel(); this.projections = new List <ProjectionOutputModel>(); }