SubSonic 2.1
I have an ActiveRecord object. When I call its Save() method, is there an easy way for me to seen the generated SQL, say in the Visual Studio debugger? Running SQL Profiler is not an option.
Thanks.
SubSonic 2.1
I have an ActiveRecord object. When I call its Save() method, is there an easy way for me to seen the generated SQL, say in the Visual Studio debugger? Running SQL Profiler is not an option.
Thanks.
You can load the subsonic source project into visual studio, and set the core project's debug target to your application and run the debugger. Or you can attach the debugger to your running application. Your application has to be built with a reference to the subsonic project's current debug output 'subsonic.dll'; I usually have both projects open in separate instances of visual studio. Then set a breakpoint about line 180 of activerecord.cs:
QueryCommand cmd = GetSaveCommand(userName);
Then do a watch on cmd to see the sql.