var query1 = (from fore in forecastShippingDate
join ship in shipOutOfStock
on fore.Id equals ship.ForecastShippingDateId
join detail in shipOutOfStockDetail
on ship.Id equals detail.ShipOutOfStockId
select MapToShipOutOfStockDetailAndMaterielCodeListDto(ship, detail, fore)
).ToList();
private static ShipOutOfStockAndDetailOutpt MapToShipOutOfStockDetailAndMaterielCodeListDto(ShipOutOfStock sh, ShipOutOfStockDetail shde, ForecastShippingDate fore)
{
IObjectMapper objectMapper = IocManager.Instance.Resolve<IObjectMapper>();
ShipOutOfStockAndDetailOutpt res = objectMapper.Map<ShipOutOfStockAndDetailOutpt>(sh);
res.MaterielCode = shde.SettlementMaterielCode;
res.WLBerthingTime = fore.WLBerthingTime.Value;
return res;
}
标签:Map,MapToShipOutOfStockDetailAndMaterielCodeListDto,映射,res,detail,fore,ship,赋值
From: https://www.cnblogs.com/moonstars/p/16667027.html