So, I've been trying to replicate this SQL query:
select COUNT(*) as Total_2_Review from ( select processed_image_id, count(*) as Total_Confirm from dbo.history where action_id=104 group by processed_image_id having count(*) > 1 ) as tbl with Linq as follows:
var total2Review = (from h in secondDb.Histories.Where(i => i.ActionId == 104) group h by new { h.ActionId, h.ProcessedImageId } into g where g.Key.ActionId > 1 select g).Count(); However, I know it should not be right because I am not selecting the actual count greater to 1 in my group clause.
How can I accomplish this SQL query as a LINQ query?
ActionIdin the Linq when you aren't in the SQL?