CodePudding user response:
Db. Regulations. Max (x=& gt; X.r gl_version);CodePudding user response:
See what version defined data types? Conditions on the Max function directly, it supports lambda expressions,CodePudding user response:
Before or not, and query, no resultsCodePudding user response:
To file, or to version?var file=db. Regulations
The Where (... )
OrderByDescending (x=& gt; X.r gl_version)
FirstOrDefault ();
CodePudding user response:
Linq Max can take to the maximum (because the single largest may have multiple)If you want to get to the largest name
Can use OrderBy sort (code the most simple, the efficiency is relatively low)
Or with Max first to get the maximum, then use the Where maximum screening items (more than if you need to get the maximum value, which is the most useful)
Or traverse the list, select the maximum and the single largest (and most efficient to write the code at most)
CodePudding user response:
The latest version of the creation time should be the biggest of allCodePudding user response:
What do you want to take first file,