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 hand,count(hand) as Hands, deviceid from individualhands where deviceid = '977aed93-d1f1-4f7a-a6fa-6bc3ea7d863b' group by hand, deviceid
誰でも助けることができますか?:)
これを試して:
var query = individualHands .Where(r => r.deviceid == '977aed93-d1f1-4f7a-a6fa-6bc3ea7d863b') .GroupBy(r => new { r.hand, r.deviceid }) .Select(g => new { hand = g.Key.hand, deviceid = g.Key.deviceid, Count = g.Count() });