1

如何将此查询从 SQL 写入 LINQ:

SELECT * FROM table
WHERE np in 
(
    SELECT np FROM table
    GROUP BY np 
    HAVING COUNT(np) > 1
4

1 回答 1

1

像这样的东西:

<Table>.GroupBy(x => x.np)
       .Where(x => x.Count() > 1)
       .SelectMany(x => x)
于 2013-09-25T18:04:47.547 回答