public void AddSourceItem(string organization, string product, string source, IEnumerable <SourceItemEntity> sourceItems) { var items = SourceItemModel.Load(organization, product, source, sourceItems); foreach (var item in items) { this.SourceItems.Add(item); } }
public static IEnumerable <SourceItemModel> Load(string organization, string product, string source, IEnumerable <SourceItemEntity> entities) { var result = new List <SourceItemModel>(); foreach (var item in entities) { var model = new SourceItemModel(); model.Load(organization, product, source, item); result.Add(model); } return(result); }