作者Tenno081 (空劲大归还)
看板Database
标题[SQL ] 能否请各位帮我转换成linq语法?
时间Thu Dec 6 17:47:25 2018
大家好,这是我的sql语法,有两个table。
select a.bed_area_name,a.bed_area_id,count(b.bed_area_id) as total_bed
from bed_area a, bed b
where a.bed_area_id=b.bed_area_id
GROUP by a.bed_area_id,b.bed_area_id,a.bed_area_name
ORDER BY a.bed_area_name desc
想请问这样怎麽转换成linq语法,单一table我还稍微会一些,两个我就投降了,
还请各位帮忙,谢谢。
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 139.223.23.125
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Database/M.1544089647.A.467.html
1F:→ blReader: C_Sharp版 12/14 22:31
2F:→ tsongs: ling去C_sharp问没错,不过我不会在程式里做 12/28 11:15
3F:→ tsongs: 我会在资料库处里好 开个VIEW把这些连接做好 12/28 11:15
4F:→ tsongs: 前端尽量只有显示 12/28 11:16
5F:→ tsongs: 避掉linq语法问题 12/28 11:49
6F:→ tsongs: 真的一定要在CLIENT处理复杂串联 SQL语法比较好写 12/28 11:50