How to See the SQL That EF Core Sends to the Database in an ASP.NET Core App (Logging)
When an EF Core query is slow or a save fails, the first question is: what SQL did it actually send? In an ASP.NET Core app you usually don't need to add anything to find out: EF Core already writes every command to the log. This guide shows where it appears, how to turn it down when it's too noisy, and how to see the parameter values, carefully.
