/// <summary> /// Converts serviceLibrary Entertainments objects from service reference to flixNet.model Entertainment objects /// </summary> /// <param name="serviceEntertainments"></param> /// <returns>List<EntertainmentModel.Entertainment></returns> private List <EntertainmentModel.Entertainment> ConvertToModelEntertainment(FlixNet.ServiceLibrary.Entertainment[] serviceEntertainments) { EntertainmentModel.Entertainment temp = null; List <EntertainmentModel.Entertainment> convertedEntertainments = new List <EntertainmentModel.Entertainment>(); foreach (FlixNet.ServiceLibrary.Entertainment oldEnt in serviceEntertainments) { temp = new Models.Entertainment() { Id = oldEnt.Id, Title = oldEnt.Title, ReleaseDate = oldEnt.ReleaseDate }; convertedEntertainments.Add(temp); } return(convertedEntertainments); }
private List <EntertainmentModel.Entertainment> ConvertToModelEntertainment(PopcornTime_2._0.EntertainmentService1.Entertainment[] serviceEntertainments) { EntertainmentModel.Entertainment temp = null; List <EntertainmentModel.Entertainment> convertedEntertainments = new List <EntertainmentModel.Entertainment>(); foreach (PopcornTime_2._0.EntertainmentService1.Entertainment oldEnt in serviceEntertainments) { temp = new Models.Entertainment() { Id = oldEnt.Id, Title = oldEnt.Title, ReleaseDate = oldEnt.ReleaseDate }; //temp = new EntertainmentModel.Entertainment(oldEnt.Id, oldEnt.genre, oldEnt.title, oldEnt.country, oldEnt.language, oldEnt.releaseDate, oldEnt.storyLine, oldEnt.filmingLocation, oldEnt.information ); convertedEntertainments.Add(temp); } return(convertedEntertainments); }