Refactor all code

This commit is contained in:
2026-05-24 17:22:03 +01:00
parent fe58e5e7e7
commit 656100d15e
117 changed files with 3317 additions and 1562 deletions
@@ -3,11 +3,16 @@ using PyroFetes.Models;
namespace PyroFetes.Specifications.WarehouseProducts;
public sealed class GetWarehouseProductByProductIdSpec : Specification<WarehouseProduct>
public sealed class GetWarehouseProductByProductIdSpec : SingleResultSpecification<WarehouseProduct>
{
public GetWarehouseProductByProductIdSpec(int productId)
public GetWarehouseProductByProductIdSpec(int productId, int? warehouseId = null)
{
Query
.Where(x => x.ProductId == productId);
if (warehouseId.HasValue)
{
Query.Where(x => x.WarehouseId == warehouseId.Value);
}
}
}