Select 使用查询表达式的常量值
Select const value using query expression
如何通过查询表达式或方法表达式实现这个查询:
Select 1, a.Id
From a
Where a.code = x
像这样:
var data = a.Where(a => a.code == x).Select(a => new { Constant = 1, a.Id });
如何通过查询表达式或方法表达式实现这个查询:
Select 1, a.Id
From a
Where a.code = x
像这样:
var data = a.Where(a => a.code == x).Select(a => new { Constant = 1, a.Id });