public void Delete(ProductBindingModel model) { var element = _productStorage.GetElement(new ProductBindingModel { Id = model.Id }); if (element == null) { throw new Exception("Продукт не найден"); } _productStorage.Delete(model); }
public async Task Delete(int productId) => await _productStorage.Delete(productId);