ต่อจากคำถามของฉันก่อนหน้านี้ที่นี่
ฉันใช้
var distinctAllEvaluationLicenses = allEvaluationLicenses.GroupBy((License => License.dateCreated)).OrderByDescending(lics => lics.Key).First();
เพื่อจัดกลุ่ม IQueryable
allEvaluationLicenses
โดยใช้คุณสมบัติของ License 1 ซึ่งก็คือ 'dateCreated'
แต่ตอนนี้ ฉันจะสั่งซื้อโดยใช้คุณสมบัติอื่น เช่น 'nLicenceID' ได้อย่างไร
เป็นไปได้ไหมที่จะทำสิ่งนี้:
var distinctAllEvaluationLicenses = allEvaluationLicenses.GroupBy((License => License.dateCreated)).OrderByDescending(lics => (sort by nLicenseID here) ).First();
nLicenseID
คุณจะทำอย่างไร หรือคุณหมายถึงการเรียงลำดับตามค่านั้นภายในแต่ละกลุ่ม? - person Servy   schedule 29.04.2013lics.Id
ตามลำดับแลมบ์ดา - person Mohammed Hossain   schedule 29.04.2013