Solved

Need help converting T-SQL query into LINQ query

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Normally the drop down box control found in the .Net framework tools is able to select just one data and value at a time, which is displayed on the text area.   But what if you want to have multiple values to be selected in the drop down box? As …
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 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

18 Experts available now in Live!

Get 1:1 Help Now