Need help converting SQL to EF4 please
- by Ken Eldridge
I need help converting this SQL statement, into EF4:
Select Posts.PostID, Post, Comment
from Posts left join
Comments on posts.PostID = Comments.PostID
Where CommentID not in
(
Select PostID
from Votes
where VoteTypeID = 4 --4 = flagged comment type
)
In my database, the Votes table stores either the PostID of reported posts, or CommentID of reported comments in the column Votes.PostID
Thanks in advance!