我有这个 SQL 语句:
select
table1.DIRECTORATE_ID,
table2.PLA_NAME + '//' + table1.ENGLISH_DIRECTORATE_CODE as EngCode
from table1
inner join table2 on table1.PLA_ID = table2.PLA_ID order by EngCode
我需要在我的 EF 代码中执行相同类型的查询,这会给我一个List<>. 像这样的东西:
var query = (from t1 table1.DIRECTORATE_ID, table2.PLA_NAME + '//' + table1.ENGLISH_DIRECTORATE_CODE as EngCode
from table1
inner join table2 on table1.PLA_ID = table2.PLA_ID order by EngCode)
.ToList();
MMTTMM
相关分类