-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL Profiler #64
Comments
I know this is a hack, but you can use Wireshark to see what exactly gets sent to the database. The reason you see parameterized logging in the ? format is because the Database Driver is using Prepared Statements. Prepared Statements escape parameters on the DBMS and prevent SQL Injection. The statement is actually sent to the DBMS with the ? marks, and the parameters are sent separately. |
1.1.0-rtm-10002 now includes statement logging when |
I cann't find the statement logging. startup.cs Configure method: appsetting.json version: |
Please note that you need to use EnableSensitiveDataLogging() to see actual parameter values when configuring the context. |
Can anyone recommend a way that i can see the actual complete sql statement that is sent to mysql with this library? The debug logger is outputting the query wit the parameters, but it shows the actual parameter values as ? like below. I'm trying to debug some issues with date parameters and need to see the exact parameter value that mysql is receiving. Thanks!
Executed DbCommand (3,887ms) [Parameters=[@__utcDate_0='?', @__AddDays_1='?', @__viewModel_LastName_2='?' (Size = 8000), @__viewModel_BirthDate_Date_3='?', @__AddDays_4='?'], CommandType='Text', CommandTimeout='30']
The text was updated successfully, but these errors were encountered: