I just started with Linq and Linq for Entity Framewok. Also using .NET Ria services. My problem is that I have 2 Folder and Item tables with many-to-many relationships using the third FolderItem connectivity table, for example: (source: InsomniacGeek.com )

In the .NET RIA Service domain service, I want to create a method that returns all the elements for a given FolderID.
In T-SQL, it would be something like this:
SELECT * FROM Item i
INNER JOIN FolderItem fi ON fi.ItemID = i.ID
WHERE fi.FolderID = 123
My Linq knowledge is limited, but I want to do something like this:
public IQueryable<Item> GetItems(int folderID)
{
return this.Context.Items.Where(it => it.FolderItem.ID == folderID);
}
This is not the correct syntax, it throws this error:
Cannot convert lambda expression to type 'string' because it is not a delegate
( )?
- .Include("FolderItem")?
, .
PS. :
public IQueryable<Item> GetItemsByFolderID(int folderID)
{
return from it in this.Context.Items
from fi in it.FolderItem
where fi.Folder.ID == folderID
select it;
}
: ?