如何在linq(c#)中编写此查询?

时间:2013-09-25 16:12:23

标签: c# linq group-by having

Select * from table
where Numero_Operacion in 
(
Select Numero_Operacion from table
group by Numero_Operacion
having count(Numero_Operacion)>1
)

谢谢!

1 个答案:

答案 0 :(得分:1)

就像这样

<Table>.GroupBy(x => x.Numero_Operacion)
       .Where(x => x.Count() > 1)
       .SelectMany(x => x)