Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 SQL 中,我有以下语句说明日志文件中的错误实例。有人可以帮我把它转换成 Linq 吗?
select * from ( select distinct bucket, count(bucket) as count, max(error) as error from logs group by bucket ) a order by count desc
var query = logs .GroupBy(x=>x.bucket) .Select (x=> new { bucket = x.Key, count = x.Count(z=>z), error = x.Max(z=>z.error) } ) .OrderByDescenting(x=>x.count);