How can I capture SQL queries in .NET?

Enable ArgusLogs database tracking for your data access layer. SQL text, duration, and correlation to the calling method can appear in structured log output—useful for finding N+1 queries and slow statements.

EF Core

Database tracker integration wraps command execution so INSERT/UPDATE/SELECT statements are logged with timing alongside the originating trace.