Beispiel #1
0
        public async Task AddTag(int tagId, NewProductTagDto newProductTag)
        {
            if (newProductTag == null)
            {
                throw new ArgumentNullException(nameof(newProductTag));
            }

            var productTag = new ProductTag
            {
                ProductId = newProductTag.ProductId,
                TagId     = tagId
            };
            await _repository.Create(productTag);
        }