开发者

How to get the sql query from a NHibernate save

开发者 https://www.devze.com 2022-12-23 03:06 出处:网络
I am trying to create a type of recorded data transaction that I can replay on a different database. For example I am capturing an order into a system, when I save that I want to be able to \"export\

I am trying to create a type of recorded data transaction that I can replay on a different database.

For example I am capturing an order into a system, when I save that I want to be able to "export" a sql script that I can run on another database to create the same order.

I am using NHibernate and I am trying to catch the sql query string for the save operation to save to a file, b开发者_StackOverflow社区ut with no success.


Checkout this question: Get executed SQL from nHibernate

I'm not sure if there is a better alternative like an event listener, if not, the IInterceptor approach seems to be the best.

0

精彩评论

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