Friday, 6 September 2013

Converting Group By T-Sql To Linq To Sql

Converting Group By T-Sql To Linq To Sql

I am currently working on a project wherein, i am using Linq to sql to
avoid using stored procedure, i am almost done with avoiding all of the
StoredProcedure, but i have one T-Sql query, which i am finding difficult
to convert in Linq.
Can anyone help me with the conversion.
select EM.EmployerID, EM.EmployerName, AD.City, AD.County,
JR.InstanceValue from JobResults JR
inner join Employers EM
on JR.EmployerName = EM.EmployerName
inner join Addresses AD
on EM.AddressID = AD.AddressID
where JR.IsPremium = 1 and JR.FieldName = 'Job Title'
group by EM.EmployerID, EM.EmployerName, AD.City, AD.County, JR.InstanceValue

No comments:

Post a Comment