Your code looks correct; here are my suggestions.
appsettings.json
.To test this, could you add the following inside services.AddLogging()
? Since this filter is at the code level, It should help override NLog settings.
logging.AddFilter("Microsoft.EntityFrameworkCore.Database.Command", LogLevel.Warning);
Microsoft.EntityFrameworkCore.Database.Command
?