I have the following LINQ query:
var query = (from p in obj1 group p by p.objID into g let totalSum = g.Sum(p => p.ObjPrice) select new { MyObjectID = g.Key, totalSum }) .Max(g => g.totalSum);
I want to select both the identifier of the object and the price of the object with the maximum price. How can i do this?
source share