Click here to Skip to main content
15,880,725 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to convert the following SQL query to linq? ORM using Nhibernate, Mapclass is having same name of Tables
SQL
SELECT Users.*,UserRole.UserRoleLinkId  FROM Users LEFT OUTER JOIN UserRole ON Users.UserId=UserRole.UserRoleId and UserRole.UserId=10 where RecordType='R'


help plz..
Posted
Updated 12-May-16 3:05am
v2
Comments
Member 11540691 3-Aug-15 8:57am    
how to write this query in linq using left outer join
please help me

select a.EventID,a.PrizeId,b.PrizeName,b.PrizeValue,c.FightID,c.Winnerid,c.WinnerName
from tblUserprize a
join tblPrizeDetails b on a.PrizeId=b.PrizeId
left outer join tblWinnersList c on a.EventID=c.EventID and a.PrizeId=c.PrizeId and c.FightID = 1534
where a.EventID = 1320

 
Share this answer
 
Comments
thatraja 31-Dec-13 2:11am    
There that bunch is looks very good. 5!
Maciej Los 31-Dec-13 2:12am    
Thank you, Raja ;)
And Best Wishes For New Year!
thatraja 31-Dec-13 2:15am    
Same to you! Please send me half if you win any lottery
Maciej Los 31-Dec-13 2:29am    
Half only? ;)

By The Way: Polish ZLOTY isn't strong currency. Please, find out: XE.xom[^]
thatraja 31-Dec-13 2:41am    
That's enough for me. Please do ASAP, it's urgentz! :)
Use tools like LINQPad[^] for conversion
 
Share this answer
 
Comments
Maciej Los 31-Dec-13 2:07am    
+5!
Have a look at my answer ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900