Associate
Am a bit confused by LINQ but have created the following where clause but it doesn't work:
It worked fine until I added the final 2 lines, any ideas?
regards,
Matt
Code:
results = results.AsQueryable().Where(x =>
x.Site == frmCarriageCoster.intCompSite &&
x.txtPostcodeSubArea == strRet &&
x.txtItemTypeDescription == "Pallet" &&
x.MinWeight <= wgt &&
x.txtDOWDescription == DoW &&
x.MaxQty > ((frmCC.txtTWgt / x.MaxQty) / x.MaxWeight) &&
x.MinQty < ((frmCC.txtTWgt / x.MaxQty) / x.MaxWeight));
It worked fine until I added the final 2 lines, any ideas?
regards,
Matt