开发者

How I do a select max(field) in Subsonic 3.0?

开发者 https://www.devze.com 2022-12-10 19:29 出处:网络
Yes, there is a method max with 13 overloads, none it\'s simply开发者_StackOverflow社区 the name of the column.Something can post an example in VB.NET?VB.NET:maxField = SomeTableClass.All().Max(Functi

Yes, there is a method max with 13 overloads, none it's simply开发者_StackOverflow社区 the name of the column. Something can post an example in VB.NET?


VB.NET:  maxField = SomeTableClass.All().Max(Function(p As SomeTableClass) p.someField).

Is an option. Using LINQ can be

(From x in SomeTableClass.All() select x.someField).Max()


(Select max(coloumnName) from TableName)

...and you can add conditions or order by after this select statement.

0

精彩评论

暂无评论...
验证码 换一张
取 消