Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图在 BLtoolkit 中向 LINQ 查询添加一个常量。
var query = dbManager.Table.Select(x=>new { x.column, cnst = 1 });
但结果中只有“column”列,但没有“cnst”列。
这也应该有效:
var query = dbManager.Table.Select(x=>new { column = x.column, cnst = 1 });
试试这个表格:
var query = from x in dbManager.Table select new { x.column, cnst = 1 };