Max value in Linq select Within Innerjoin
问题 I have the following dilemma : We have two tables : Patient and Charges , patOID being foreign key within the Charges table. A simple join between 2 tables: from itemPat in listPat join itemCharge in listCharge on itemPat.patOID equals itemC.patOID select new { itemPat.patOID, itemCharge.paid } Considering the face that a patient can have more than 1 charges, how can I get the itemCharge for the biggest value of a certain field( ex. paid ) . What have i tried : from itemPat in listPat join