I have this query which I retrieve from 6 tables which gets the dates, rated, rater, classname, scores, subject.
SELECT r.date, u1.username as rated, u2.username as rater, c.name as classname, s.ratings, sbj.name
FROM Ratings r
INNER JOIN Users u1 ON u1.userid = r.rated
INNER JOIN Users u2 ON u2.userid = r.rater
INNER JOIN ClassMembers cm ON u1.userid = cm.userid
INNER JOIN Class c ON cm.teamid = c.teamid
INNER JOIN Scores s ON s.ratingsid = r.ratingsid
INNER JOIN Subjects sbj ON sbj.subjectid = s.subjectid
this results in
date | rated | rater | teamname | score | subject
10/12/2012 john mike teamA 9 Math
10/09/2012 john mike teamA 9 Science
10/09/2012 john abra teamA 5 Math
10/09/2012 john abra teamA 5 Science
I have to convert this query to a LINQ expression. I'm having a hard time converting my sql query into LINQ. Any help would be appreciated.