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.
重複の可能性: グループ化せずに 1 つの LINQ クエリで 2 つの列の合計を取得する
EFを使用して1回の呼び出しでMaxとCountを選択する方法は?
Select Max([Column]), Count(*) from [Table]
でグループ化して偽造できると思います0。SQL Server は、その一定の group-by を見抜き、それを排除します。ランタイム コストはありません。
0
問題は、EF はこれを SQL に適切に変換するかどうかです。実績を考えると (古き良き信頼できる LINQ to SQL とは対照的に!)、これには疑問があります。