public void AddJourneys(string organization, string product, IEnumerable <JourneyEntity> journeys) { var items = JourneyModel.Load(organization, product, journeys); foreach (var item in items) { this.Journeys.Add(item); } }
public static IEnumerable <JourneyModel> Load(string organization, string product, IEnumerable <JourneyEntity> entities) { var result = new List <JourneyModel>(); foreach (var item in entities) { var model = new JourneyModel(); model.Load(organization, product, item); result.Add(model); } return(result); }