How convert sql query to linq-to-sql
Posted
by name1ess0ne
on Stack Overflow
See other posts from Stack Overflow
or by name1ess0ne
Published on 2010-06-02T20:27:20Z
Indexed on
2010/06/02
20:34 UTC
Read the original article
Hit count: 293
sql
|linq-to-sql
I have Sql query:
SELECT News.NewsId, News.Subject, Cm.Cnt FROM dbo.News
LEFT JOIN
(SELECT Comments.OwnerId, COUNT(Comments.OwnerId) as Cnt FROM Comments WHERE Comments.CommentType = 'News' Group By Comments.OwnerId) Cm
ON Cm.OwnerId = News.NewsId
But I want linq-to-sql query, how I can convert this to linq?
© Stack Overflow or respective owner