我有一个SQL语句,如:
SELECT Table1.proID, Table1.proName, Table1.price, Table1.amount, [gia]*[sl] AS total
FROM Table1;
如何将其转换为Linq ??
答案 0 :(得分:0)
var lst = Table1.Select(x => new { Filed1 = x.proID, Field2 = x.proName, Field3 =x.price,Field4 = x.amount, total=x.gia*x.sl});