Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

how to convert raw sql to entity linq

$
0
0

this is the query i want to convert to linq

select distinct Users.Name,Packages.PName,Packages.Price,RefEarning=(select Price*ReferCommission/100)
from Users inner join UserPackages on UserPackages.U_ID=Users.ID
 inner join Packages on Packages.PID=UserPackages.P_ID
 inner join Refers on Users.Ref_No=Refers.RefOf  
where exists(
select  Users.ID from users   where Refers.RefOf='Gerfwscv6kOwnIM8hl_TiA'
) and UserPackages.PackageStatus='true'


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>