コード例 #1
0
        public void Delete(ProductBindingModel model)
        {
            var element = _productStorage.GetElement(new ProductBindingModel {
                Id = model.Id
            });

            if (element == null)
            {
                throw new Exception("Продукт не найден");
            }
            _productStorage.Delete(model);
        }
コード例 #2
0
 public async Task Delete(int productId) => await _productStorage.Delete(productId);