Following from my question previously here
I used
var distinctAllEvaluationLicenses = allEvaluationLicenses.GroupBy((License => License.dateCreated)).OrderByDescending(lics => lics.Key).First();
To group the IQueryable
allEvaluationLicenses
by using License's property 1 which is 'dateCreated'
But now, how can I order them by using a different property such as 'nLicenceID'?
Is it possible to do something like this:
var distinctAllEvaluationLicenses = allEvaluationLicenses.GroupBy((License => License.dateCreated)).OrderByDescending(lics => (sort by nLicenseID here) ).First();