예제 #1
0
        public async Task AddItemsToBundleAsync(IEnumerable <Item> items, Guid itemBundleId, CancellationToken cancellationToken = default)
        {
            if (items == null)
            {
                throw new ArgumentNullException(nameof(items));
            }

            if (itemBundleId == Guid.Empty)
            {
                throw new ArgumentNullException(nameof(itemBundleId));
            }

            foreach (var item in items)
            {
                await itemBundleMappingRepository.AddItemBundleMappingAsync(item.ItemId, itemBundleId, cancellationToken);
            }
        }
 public async Task AddItemBundles()
 {
     await itemBundleMappingRepository.AddItemBundleMappingAsync(itemBundleMapping);
 }