Some fixes
This commit is contained in:
@@ -15,7 +15,7 @@ public class GetPriceDto
|
|||||||
public int SupplierDeliveryDelay { get; set; }
|
public int SupplierDeliveryDelay { get; set; }
|
||||||
|
|
||||||
public int ProductId { get; set; }
|
public int ProductId { get; set; }
|
||||||
public string? ProductReferences { get; set; }
|
public string? ProductReference { get; set; }
|
||||||
public string? ProductName { get; set; }
|
public string? ProductName { get; set; }
|
||||||
public decimal ProductDuration {get; set;}
|
public decimal ProductDuration {get; set;}
|
||||||
public int ProductCaliber { get; set; }
|
public int ProductCaliber { get; set; }
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ public class GetPurchaseProductDto
|
|||||||
public string? ProductImage { get; set; }
|
public string? ProductImage { get; set; }
|
||||||
public string? ProductLink { get; set; }
|
public string? ProductLink { get; set; }
|
||||||
public int ProductMinimalQuantity { get; set; }
|
public int ProductMinimalQuantity { get; set; }
|
||||||
|
public decimal ProductPrice { get; set; }
|
||||||
|
|
||||||
public int PurchaseOrderId { get; set; }
|
public int PurchaseOrderId { get; set; }
|
||||||
public string? PurchaseOrderPurchaseConditions { get; set; }
|
public string? PurchaseOrderPurchaseConditions { get; set; }
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ public class EntityToDtoMappings : Profile
|
|||||||
|
|
||||||
// CreateMap<PurchaseOrder, GetPurchaseOrderDto>();
|
// CreateMap<PurchaseOrder, GetPurchaseOrderDto>();
|
||||||
//
|
//
|
||||||
// CreateMap<PurchaseProduct, GetPurchaseProductDto>();
|
CreateMap<PurchaseProduct, GetPurchaseProductDto>();
|
||||||
|
|
||||||
|
|
||||||
CreateMap<PurchaseOrder, GetPurchaseOrderDto>()
|
CreateMap<PurchaseOrder, GetPurchaseOrderDto>()
|
||||||
.ForMember(dest => dest.Products,
|
.ForMember(dest => dest.Products,
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ public sealed class GetProductByIdSpec : Specification<Product>
|
|||||||
public GetProductByIdSpec(int? productId)
|
public GetProductByIdSpec(int? productId)
|
||||||
{
|
{
|
||||||
Query
|
Query
|
||||||
.Where(p => p.Id == productId);
|
.Where(p => p.Id == productId)
|
||||||
|
.Include(p => p.Prices);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,6 +10,7 @@ public class GetPurchaseOrderByIdWithProductsSpec : Specification<PurchaseOrder>
|
|||||||
Query
|
Query
|
||||||
.Where(p => p.Id == purchaseOrderId)
|
.Where(p => p.Id == purchaseOrderId)
|
||||||
.Include(p => p.PurchaseProducts!)
|
.Include(p => p.PurchaseProducts!)
|
||||||
.ThenInclude(pp => pp.Product);
|
.ThenInclude(pp => pp.Product)
|
||||||
|
.ThenInclude(pp=> pp!.Prices);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user