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.
精彩评论