开发者

nHibernate order by N with SQL Server

开发者 https://www.devze.com 2022-12-09 09:14 出处:网络
With a SQL Query I can order by N, where N is a column index. For example SELECT name, salary FRO开发者_开发知识库M employee ORDER BY 2;

With a SQL Query I can order by N, where N is a column index. For example

 SELECT name, salary FRO开发者_开发知识库M employee ORDER BY 2;

How can I do this with nHibernate?


You can't. NHibernate order by clause requires property names (aliases) and / or expressions to be specified.

0

精彩评论

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