Solved

Need help converting T-SQL query into LINQ query

Posted on 2011-03-08
3
342 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

738 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