NHibernates的确切区别是什么?
Projection.RowCount()
和
Projection.Count()
当我们在寻找行数/结果时?
发布于 2011-06-05 22:53:22
Projection.Count期望你传递一个你想要计数的属性,即
Projection.Count("propertyName")
在SQL中,它转换为以下内容
select Count(this.whateverNhibernateConvention) from table as this
对于Projection.RowCount,您不需要传递任何可以转换为
select Count(1) from table as this
我想我希望出现上述情况。
https://stackoverflow.com/questions/6243367
复制相似问题