我正在写一个简单的LINQ
查询。表结构定义如下:
表 A
Id int,
VName varchar2(20),
VAddress varchar2(200)
表 B
Id int,
NName varchar2(20),
NAddress varchar2(200)
LINQ
询问
from c in A
join x in B on c.Id equals x.Id
order by A.Id
select New{
c.Id,
x.NName
}
然后 SQL 生成为
select Filter1.Id,Filter1.NName from(
Select Extend1.Id,Extend1.VName,Extend1.VAddress,
Extend2.Id as Id1,Extend2.NName,Extend2.NAddress
from A as Extend1 Inner Join B as Extend2 on Extend1.Id=Extend2.ID)
as Filter1
我的问题:我不想在 SubQuery 中选择很多列。