有谁知道如何将此查询转换为LINQ to SQL?如何使用左连接,聚合和where子句创建Linq to Sql
SELECT posts.*, count(COMMENTS.*) AS comment_count FROM POSTS
LEFT JOIN COMMENTS on POSTS.id = COMMENTS.post_id
WHERE comments.date IS NULL OR comments.date >= [NOW]
GROUP BY posts.id
ORDER BY comment_count DESC
它在SQL中很简单,但是我在将linq转换为sql时遇到了困难。任何帮助,将不胜感激!
感谢
的感谢!会检查出来! – gogogom3