예제 #1
0
        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);
            }
        }
예제 #2
0
        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);
        }