fix error in GetTotalQuantityEndpoint.cs
This commit is contained in:
@@ -31,9 +31,10 @@ public class GetTotalQuantityEndpoint(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int totalQuantity =
|
int? totalQuantityNullable = await warehouseProductsRepository.
|
||||||
await warehouseProductsRepository.SumAsync(new GetProductTotalQuantitySpec(req.ProductId),
|
SumAsync(new GetProductTotalQuantitySpec(req.ProductId), wp => wp.Quantity, ct);
|
||||||
wp => wp.Quantity, ct);
|
|
||||||
|
int totalQuantity = totalQuantityNullable ?? 0;
|
||||||
|
|
||||||
GetTotalQuantityDto responseDto = new()
|
GetTotalQuantityDto responseDto = new()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user