有谁知道如何将此查询转换为 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。任何帮助,将不胜感激!
谢谢