Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Linq Using Join SQL Syntax Question?

I am new to Linq, and I am having trouble grasping the syntax with respect to multi-table joins. I have three tables... workItem, workItemTemplate, and skill. A workItem has a particular kyworkItemTemplate which is used as a foreign key to the workItemTemplate table. A workItemTemplate has a kyWorkItemType which joins it to a skills table. Each row in the skills table indicates a workItemType that a user can perform.

The SQL that does what I want looks like this...

select s.*

from workitem w

inner join workitemtemplate t

on w.kyworkitemtemplate = t.kyworkitemtemplate

inner join skill s

on t.kyworkitemtype = s.kyworkitemtype

where s.kyUser = 'e158177'

and w.kyworkitem = 138

OR

select s.*

from workitem w, workitemtemplate t, skill s

where w.kyworkitemtemplate = t.kyworkitemtemplate

and t.kyworkitemtype = s.kyworkitemtype

and s.kyUser = 'e158177'

and w.kyworkitem = 138;

If either of these retorns a row, I know that employee e158177 has the skills to work the particular workItem #138. Can anyone help me out with the Linq syntax?

2 Answers

Relevance
Still have questions? Get your answers by asking now.