【发布时间】:2015-03-14 21:20:54
【问题描述】:
我有 2 个表,我根据某些要求进行了一些连接以返回记录列表。 我可以通过查询为我的 requiremnet 编写一个组并检查记录,但我在 Linq 查询中需要相同的内容。 我的 sql 查询是:
select
MiscServiceDesc,
sum(PaymentAmount),
count(PaymentAmount)
from
MiscTransaction MT
join MiscService MS
on MT.MiscServiceID = MS.MiscServiceID
group by
MiscServiceDesc
其中 MiscTransaction 和 MiscService 是我的两个表。
有什么帮助吗? 提前致谢
【问题讨论】:
-
我需要加入时。
-
@Santosh 写法一样,加入或不加入。
-
也可以查看这个帖子:stackoverflow.com/questions/27730575/…
标签: linq sql-to-linq-conversion