Entity Framework Core 5.0 comes with SQL-based brother to ToString() method for LINQ-queries. This method is called ToQueryString() and it returns provider-specific SQL without connecting to database server. In some means it's similar to ToTraceString() method of Entity Framework. This blog post shows how ToQueryString() method works. NB!