コード例 #1
0
        private async Task <bool> CheckQuantityAsync(Guid productId, Guid orderId)
        {
            var order = await _orderRepo.GetOrderByIdAsync(orderId);

            var product = await _productRepository.GetProductByIdAsync(productId);

            await _inventoryRepo.CheckQuantityAsync(product.Inventory.Quantity, order.Quantity);

            return(true);
        }