关于linq中写入算术表达式的问题
using (TYLAS5Entities t = new TYLAS5Entities())
{
var res = from b in t.T_BookStorage
where b.BookGUID == guid
join c in t.T_CollectDept
on b.CollectDeptCode equals c.CollectDeptCode
select new
{
BarCode=b.BarCode,
CollectDeptName =c.CollectDeptName,
ReceiveDate=b.ReceiveDate,
Price=b.Price,
折后价=b.PriceRate*Convert.ToDouble(b.Price), //这里搞不定
State=b.State
};
return res.ToList().ToDataTable();
}
State=x.b.State
});
return res.ToList().ToDataTable();
}