Schemawise
EF Core superpowers for VS Code. Navigate. Compare. Migrate safely.
Schemawise shows you what EF Core really does with your model, compares it with your real
database, and tells you what a migration can break before you apply it.
100% local. No source code, connection string, schema or data ever leaves your machine.
No account, no telemetry.

✨ Schemawise Pro: see what your queries really do
Find the N+1 before your users do. Start your app as usual: every SQL query EF Core runs shows up
at the line of code that runs it, with N+1 queries, slow queries and huge results flagged in the editor.
No package to add, no code to change.

- Query Profiler: N+1, slow queries and large results, at the line that runs them, and the N+1 fixed in one click.
- Index advisor: the missing indexes of your real queries, with the
HasIndex(...) line to add.
- Database diagram and data dictionary: every table, column and relationship, exported for your docs.
- CI check (early access): block the pull request that drops a column or breaks the schema.
- Fix drift, migration conflicts between branches, migration status of every database.
Free for 14 days, starting the first time you use a Pro feature: no account, no card. See all Pro features ↓
Features
Explore the EF Core model
Schemawise: Analyze Workspace finds your .NET projects, their EF Core version, provider and
DbContexts. Expand a DbContext in the EF Model view to see the effective model, as EF Core
builds it (conventions, fluent configuration and attributes included):
- entities → tables (and schemas), properties → columns and store types;
- keys, foreign keys, indexes, owned and complex types, shadow properties;
- click an entity or a property to jump to its source.
The model comes from EF Core itself, by loading your compiled project like dotnet ef does.
Schemawise does not guess by parsing C#.
Detect schema drift
Add a SQL Server or PostgreSQL connection in the Databases view, then run
Compare Model with Database (or use the button on a DbContext). The Schema Drift view
lists what differs, grouped by severity, each with an explanation:
missing or extra tables and columns · store types · max length · precision and scale ·
nullability · primary keys · indexes.
Schemawise only reads schema metadata (never table data) and never changes the database.
See the database from your code
Open an entity class: a CodeLens above it shows its table, the approximate number of rows and
whether it matches the database (dbo.Customers · ~12k rows · ✓ in sync). Click it to show the
table in the Databases view. Hover a property to see its column as EF Core maps it, the
actual column in the database, keys and indexes, and any difference. Show in database jumps
to the column.
From the Databases view, Go to Code (on a table or column) opens the matching entity or
property.
Each DbContext is shown against one database: the last one you compared it with, the only
connection of its provider, or the one you choose with Schemawise: Link Database to
DbContext. Row counts come from the database's statistics (no data is read). Turn the feature
off with eflens.codeInsights.enabled.
Understand migration risks
Click a migration in the EF Model view, or run Schemawise: Inspect Migration. The
Migration Risks view lists every operation of the migration with its risk level, what can
go wrong and how to avoid it:
| Level |
Examples |
| Critical |
Drop table |
| High |
Drop column, shrink a column, reduce precision, change a type, make a column required without default |
| Medium |
Add a required column, create a unique index, rename, custom SQL, add a foreign key |
| Safe |
Add a nullable column, create a table |
Choose a database marked Production as the target and Schemawise adds a warning banner.
Schemawise never runs migrations.

Catch mapping pitfalls (model checks)
From the model alone, no database needed, Schemawise flags in the Problems panel, on the
property or class concerned:
| Code |
Check |
| EFL6001 |
decimal without precision: SQL Server silently rounds to 2 decimals |
| EFL6004 |
Multiple cascade paths or a cascade cycle: SQL Server rejects the foreign key when the migration runs |
| EFL6003 |
Primary key over 900 bytes or index key over 1700 bytes: long values fail to insert |
| EFL6006 |
Key or index on a (max) column: the migration fails |
| EFL6005 |
Numbered shadow foreign key (CustomerId1): a relationship configured twice |
| EFL6007 |
Table without schema while other tables have one: created in the user's default schema (dbo, public) |
| EFL6002 |
String without maximum length (hint in the editor) |
Schemawise Pro
Everything below is part of Schemawise Pro, free to try for 14 days (the trial starts the first time
you use a Pro feature). At the end of the trial, a one-minute survey
asks whether you would like it to continue: it will if enough developers want it.
Query Profiler: the SQL of your app, at the line that runs it
The Query Profiler shows every SQL query your app runs, at the line of code that runs it:
⚠ 144 queries · 1.4 s · N+1 right above the loop. N+1 queries (the same query many times in one
request), slow queries and large results are flagged in the editor and the Problems panel; click to see
the SQL, the number of executions and the timings.
Fix it in one click: the lightbulb on an N+1 warning moves the query out of the loop (one query for
all the items, grouped in memory) and shows the change in the refactor preview before applying it.
The globe button groups everything by HTTP request (ASP.NET Core): each endpoint with its number of
queries per request, its time and its findings, the most expensive first, such as
GET /api/orders/{id} · 49 queries per request · 1.5 s · N+1.
It also catches the other classic EF Core mistakes, each with its one-click fix:
| Finding |
What happens |
Fix |
| N+1 |
The same query runs once per item of a loop |
One query before the loop |
| Cartesian explosion |
Several collections with Include() in one SQL statement multiply the rows |
AsSplitQuery() |
| Synchronous query in an async method |
ToList(), First(), SaveChanges() block a thread while the database answers |
await ToListAsync()… |
| Read-only query that tracks |
Entities tracked by a DbContext that never saves |
AsNoTracking() |
| Slow query, large result |
Over 500 ms, over 10,000 rows |
Index advisor, filter or paginate |
New to Schemawise? Schemawise: Get Started opens a five-minute tour.
Run Schemawise: Set Up Query Profiler once (it adds two variables to your launch profile, for
VS Code with C# Dev Kit, Visual Studio, Rider or dotnet run), then start your app as usual. No package
to add, no code to change: the profiler is a .NET startup hook that listens to EF Core's diagnostic
events. It only runs in Development, writes to a local file, and never records parameter values.

Index advisor: the missing indexes of your real queries
Suggest Indexes (lightbulb in the Query Profiler view) reads the estimated execution plans of the
profiled queries from your database (it never runs them) and lists the missing indexes, ranked by the
time they would save, with the EF Core configuration to add to your model.

Database diagram and data dictionary
Show Database Diagram draws every table of a DbContext with all its columns, and each relationship
from its foreign key column to the referenced key, in crow's foot notation, routed around the tables.
After a comparison, tables are coloured by drift. Switch to Keys only for big models, click a table to
open its class, and export it for your documentation: SVG, PNG, Mermaid, or a Markdown data
dictionary (every table, column, key, reference and index, with the diagram).

CI check: stop risky migrations in the pull request
Early access: the schemawise command-line package is coming to npm (ask for it).
schemawise check --fail-on high runs the model checks, the risks of the pending migrations and
(with --connection-env STAGING_DB) the drift against a database in your pipeline. With
--format github, findings appear as annotations on the right lines of the pull request.

Fix drift
The wrench on a difference (or Fix All Differences) gives, for each one, the EF Core configuration
that makes your model match the database, and the SQL that makes the database match your model.
Nothing is applied: you choose, review and copy.
Migrations in a team
- Check Migration Conflicts: another branch added migrations to the same DbContext since yours
started? Schemawise warns you after each analysis and tells you how to regenerate yours, before the
model snapshot gets broken by the merge.
- Show Migration Status: a table of the migrations of a DbContext against every saved database
(local, staging, production…): applied, pending, or applied there but missing from your code.
Requirements
- The .NET 8 runtime (or later) to run Schemawise.
- The .NET SDK your projects need, to build and analyse them.
- Tested with EF Core 8 and 9; database features support SQL Server and PostgreSQL.
Schemawise builds your projects to read their model, which runs code from the workspace. It is
therefore disabled in untrusted workspaces (Restricted Mode).
Commands
| Command |
What it does |
| Schemawise: Get Started |
A five-minute tour of the main features |
| Schemawise: Analyze Workspace |
Find projects, DbContexts and migrations |
| Schemawise: Compare Model with Database |
Schema drift between a DbContext and a database |
| Schemawise: Inspect Migration |
Risks of a migration, before applying it |
| Schemawise: Add Database Connection |
Save a connection (string kept in VS Code Secret Storage) |
| Schemawise: Set Up Query Profiler |
Profile the SQL queries of your app (Pro) |
| Schemawise: Check Migration Conflicts |
Migrations added on another branch to the same DbContext (Pro) |
| Schemawise: Show Migration Status |
Which migrations each database has applied (Pro) |
| Schemawise: Show Database Diagram |
Entities, keys and relationships of a DbContext (Pro) |
| Schemawise: Suggest Indexes |
Missing indexes for the profiled queries, as EF Core configuration (Pro) |
| Schemawise: Enter Pro Licence Key |
Unlock Pro features (the key is checked offline) |
| Schemawise: Copy Diagnostics |
Copy a report for a bug report (no code, secrets or paths) |
| Schemawise: Show Logs |
Open the Schemawise output channel |
Settings
| Setting |
Purpose |
eflens.dotnetPath |
dotnet executable to use (default: from PATH) |
eflens.hostLogLevel |
Log verbosity: debug, info, warning, error |
eflens.codeInsights.enabled |
CodeLens and hover on entity classes |
eflens.modelChecks.enabled |
Model checks in the Problems panel |
eflens.migrations.baseBranch |
Branch compared by Check Migration Conflicts (default: origin's default branch) |
Privacy and security
- Connection strings are stored in VS Code Secret Storage and only passed to the local Schemawise
process; they are redacted from every log and error message.
- Database access is read-only metadata (catalog views), EF Core's migration history table, and
estimated execution plans of SELECT queries (never executed); Schemawise issues no
INSERT, UPDATE, DELETE or DDL.
- The query profiler writes to a file in your temporary folder that only Schemawise reads; it
never records parameter values, and does nothing in the Production or Staging environments.
- Licence keys are checked offline; nothing is sent anywhere.
- The query profiler records route templates of HTTP requests (
/api/orders/{id}), never the real
paths or query strings.
- No telemetry. The rating request counts successes locally (in VS Code's storage) and only opens the
store page if you click "Rate Schemawise".
- Schemawise itself makes no network calls other than to the databases you configure. (The
dotnet build it runs may restore NuGet packages, exactly as when you build yourself.)
Reporting a problem
Run Schemawise: Copy Diagnostics and paste the report into a
new issue, together with
what you expected. The report contains versions, statuses and diagnostic codes only.
Preview: feedback on false positives (drift or migration risks reported wrongly) is the most
useful thing you can send.
License
Schemawise is proprietary software. Its features are free, except the Pro features (marked "Pro"), which come with a 14-day trial and then require a licence key. See LICENSE.txt
and THIRD-PARTY-NOTICES.txt.