Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道如何启用调试,以便所有运行的查询都出现在我的控制台中。有什么方法可以简单地输出生成的查询而不执行它?
不,你不能。如果 NHibernate 没有针对实际数据库执行实际 SQL,它就不会知道查询方法的结果是什么。例如:
Client[] = Client.FindAll();
该方法必须返回一些客户端集合,如果 ActiveRecord/NHibernate 没有将 SQL 发送到数据库,它就不会知道返回什么。