c# - How to get the parameter declarations as well as the SQL calls of NHibernate? -


When I'm working with NHibernate (I'm starting betting it) I am able to get SQL call in DB. I

My production but I can not work after copying and pasting it in Management Studio

Because this parameter declarations are missing.

I get something:

  SELECT this_.PK_Product as PK1_1_0_, this_.ProductCode ProductC2_1_0_, Product_3_1_0_ as this_.ProductName, this_. ProductCodeISO2 Manufacturer 4_1_0_ has not been used as this_.NotUsed1_0_, it has been confirmed. The confirmation has been confirmed as 1_0_, this label. LabelReq7_1_0_ as the label tProduct_ here (this_.NotUsed = @ p0 and this_ has been confirmed = @ P1 and this_.labelaruped = @ P2); @ P = = wrong [type: boolean (0)], @ p1 = true [type: boolean (0)], @ p2 = wrong [type: boolean (0)] 'enter code here' > 

When I execute it in my SQL Management Studio, I get an error:

Message 137, Level 15, State 2, Line 1 Scalar Variables Must have to declare "@ p0".

Can I tell NHibernate to add parameter declarations to a query string created in some way?

Thanks

I use SQL Server for profile I am a professor who comes with Microsoft SQL Server Management Studio or

In SQL Server Profiler, you see the details with parameter declarations and values, so that you can copy and paste them into the management studio only.

You can see the SQL statement in the NHibernate profiler, but the parameters have already been changed with the values ​​(you can see the parameter name in the comments) I would highly recommend the NHibernate profiler, Can download.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -