Given this Linq query to connect 3 tables just to retrieve the CategoryName I end up with the 2 categories but also with the same title twice. I suspect I need a group by to eliminate the duplicate title and keep the 2 categories.
From ca In be_Categories Join c In be_PostCategory On ca.CategoryID Equals (c.CategoryID)
Join p1 In be_Posts On c.PostID Equals (p1.PostID) Where p1.PostRowID = 1002
Select ca.CategoryName, p1.title
I have test the query in LinqPad and this is what I get:
I suspect I need a Group By to get the query working right so i can return the 2 categories but just one of everything else. I've been reading various resources on Group By but am no closer to getting it to work.