Solved

Need help converting T-SQL query into LINQ query

Posted on 2011-03-08
3
339 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

912 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now