How can I view the complete sql query generated by Entity Framework (version 5)? I can view it using
query.ToString()
but I don't get all the parameters with it. I get a lot of variables like @p_linq_0.
How can I view the complete sql query generated by Entity Framework (version 5)? I can view it using
query.ToString()
but I don't get all the parameters with it. I get a lot of variables like @p_linq_0.
Copyright © 2021 Jogjafile Inc.
You can log the SQL queries in your Console Output window by using
EnableSensitiveDataLoggingEnableSensitiveDataLogging also log more details when an exception occurs in EFFrom EF Core 5.0 onwards you can also use the
LogTomethod which takes an Action delegate as a parameter and enables you to log into the Console or to a file, or to a NoSQL database for example