Solved

Need help converting T-SQL query into LINQ query

Posted on 2011-03-08
3
341 Views
Last Modified: 2013-11-11
I need help converting the T-SQl query below into a LINQ query.   Can anyone help?
SELECT DISTINCT pa.AttributeId, a.Name, ap.Permission 
FROM ProductAttribute AS pa
JOIN attribute as a on pa.AttributeId = a.Id
LEFT JOIN AttributePermission AS ap ON a.Id = ap.AttributeId and ap.userId = @userId
ORDER BY pa.AttributeId

Open in new window

0
Comment
Question by:markerasmus
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
mayank_joshi earned 500 total points
ID: 35068711
0
 
LVL 9

Assisted Solution

by:mayank_joshi
mayank_joshi earned 500 total points
ID: 35068733
0
 

Author Closing Comment

by:markerasmus
ID: 35071081
Thanks, your solution helped.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question