EF QueryLens translates EF Core LINQ to SQL at hover time. A shared daemon does the work — no database connection needed.
1. Install the extension for your IDE
2. Run "EF QueryLens: Setup" to generate your offline DbContext factory
3. Build your solution
4. Hover any LINQ query → SQL appears
That's it. Setup scans your AddDbContext registrations and auto-generates everything it needs.
| Hover any EF Core LINQ expression to see the generated SQL inline. No context switching, no logging, no guessing. | Open the full SQL in a dedicated editor panel. Copy to clipboard or inspect split-query statements with per-split labels. |
Run EF QueryLens: Setup once. QueryLens scans your AddDbContext registrations, generates a gitignored factory, and is ready to go — no manual wiring.
|
SQL is generated from your compiled assembly, not a live database. Works anywhere your code builds — no connection string required at runtime. |
| One daemon, consistent results across VS Code, JetBrains Rider, and Visual Studio. | SQL Server, PostgreSQL, and MySQL are each formatted with their correct dialect — what you see is what EF Core actually sends. |
| Expose LINQ-to-SQL translation to AI agents and automation via a built-in MCP server. Query your data model programmatically. | Multi-statement split queries are rendered with per-statement labels so you see exactly how EF Core breaks up the load. |
1. Install the extension
| IDE | Link |
|---|---|
| VS Code | Visual Studio Marketplace |
| JetBrains Rider | JetBrains Marketplace |
| Visual Studio | Visual Studio Marketplace |
2. Set up your offline DbContext factory
EF QueryLens needs a lightweight offline DbContext to generate SQL without a live database. Run EF QueryLens: Setup from the command palette — QueryLens inspects your AddDbContext registrations and generates the factory for you, gitignored and ready to go.
You can also trigger setup by hovering any LINQ query and clicking Set up QueryLens for this project.
For multiple DbContexts, custom options, or manual factory authoring, see Factory Setup.
3. Build your solution
dotnet buildThis compiles the generated factory so QueryLens can load it.
4. Hover any LINQ expression
SQL appears in the hover popup. Use the inline actions to copy, open the full SQL panel, or refresh.
Build commands
# .NET solution
dotnet build EFQueryLens.slnx
dotnet test EFQueryLens.slnx
# VS Code plugin
npm ci --prefix src/Plugins/ef-querylens-vscode
npm run compile --prefix src/Plugins/ef-querylens-vscode
# Rider plugin
cd src/Plugins/ef-querylens-rider
./gradlew buildSee CONTRIBUTING.md.
See SECURITY.md.
MIT — see LICENSE.



