@David Thielen, Welcome to Microsoft Q&A, you could use UseLoggerFactory
to see the generated SQL Query.
Please install Nuget-Package Microsoft.Extensions.Logging.Console
first of all.
Then, you could add the following code in your OnConfiguring method:
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseLoggerFactory(LoggerFactory.Create(builder => builder.AddConsole()))
.EnableSensitiveDataLogging();
}
Based on my test, it could generate the sql query in the console.
Hope my solution could be helpful for you.
Best Regards,
Jack
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.