Click here to Skip to main content
15,936,395 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am new in Entity framework. Please help me to convert these sql query in Entity Framework. Here table name is DB_Deals and Title, ProductDescription,VendorName are the fields.
Here is the Query:-

1.SELECT DISTINCT Title, ProductDescription, COUNT(1) as Duplicate FROM DB_Deals GROUP BY Title, ProductDescription HAVING COUNT(1) > 1;

2. select a.Title,a.ProductDescription,a.VendorName from DB_Deals a join (SELECT DISTINCT Title, ProductDescription, COUNT(1) as Duplicate FROM DB_Deals GROUP BY Title, ProductDescription HAVING COUNT(1) > 1)b on a.Title=b.Title and a.ProductDescription=b.ProductDescription


Thanks in Advanced.
Posted

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