T-SQLクエリを使用する:
select [ProductNumber] ,max([ProductRevNumber])
from Products
group by [ProductNumber]
LINQクエリを試行しました:
ProductsDBContext.Products.GroupBy(x => x.ProductRevNumber)
.Select(group => ProductNumber,
ProductRevNumber = group.Max(x => x.ProductRevNumber));
ラムダクエリは機能しません。