@@ -6,6 +6,12 @@ A VS Code extension to manage Entity Framework migrations.
66
77<img src =" ./images/treeview-screenshot.png " width =" 460 " alt =" Entity Framework Migrations " />
88
9+ ## Requirements
10+
11+ - [ dotnet sdk] ( https://dotnet.microsoft.com/download )
12+ - [ efcore tools] ( https://learn.microsoft.com/en-us/ef/core/cli/dotnet )
13+ - [ Microsoft.EntityFrameworkCore.Design] ( https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Design ) must be installed in one of the projects
14+
915## Features
1016
1117- List migrations by [ ` DbContext ` ] ( https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext )
@@ -14,12 +20,13 @@ A VS Code extension to manage Entity Framework migrations.
1420- Export ` DbContext ` as SQL script
1521- View ` DbContext ` information
1622- [ Scaffold] ( https://learn.microsoft.com/en-us/ef/core/cli/dotnet#dotnet-ef-dbcontext-scaffold ) ` DbContext ` & entity types
23+ - Generate ER Diagram (Requires EF Core 7+)
1724
18- ## Requirements
25+ ### ER Diagram
1926
20- - [ dotnet sdk ] ( https://dotnet .microsoft.com/download )
21- - [ efcore tools ] ( https://learn.microsoft.com/en-us/ef/core/cli/dotnet )
22- - [ Microsoft.EntityFrameworkCore.Design ] ( https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Design ) must be installed in one of the projects
27+ A [ ` Mermaid ` ] ( https://mermaid.js.org/syntax/entityRelationshipDiagram.html ) [ ` .t4 ` ] ( https://learn .microsoft.com/en-us/ef/core/managing-schemas/scaffolding/templates ) template will be installed into the project. You can ignore this file (by adding it to ` .gitignore ` ), or add it to source control. The template file is used to generate the ER Diagram, feel free to customise it. If you delete it, it will be regenerated next time you generate an ER Diagram.
28+
29+ < img src = " ./images/er-diagram.png " width = " 640 " alt = " Entity Framework Migrations " />
2330
2431## Extension Settings
2532
@@ -89,9 +96,7 @@ This extension contributes the following settings:
8996 " --project" ,
9097 " \" $project\" " ,
9198 " --startup-project" ,
92- " \" $project\" " ,
93- " --no-color" ,
94- " --json"
99+ " \" $project\" "
95100 ],
96101 "listMigrations" : [
97102 " dotnet" ,
@@ -103,9 +108,7 @@ This extension contributes the following settings:
103108 " --project" ,
104109 " \" $project\" " ,
105110 " --startup-project" ,
106- " \" $project\" " ,
107- " --no-color" ,
108- " --json"
111+ " \" $project\" "
109112 ],
110113 "dbContextInfo" : [
111114 " dotnet" ,
@@ -117,9 +120,7 @@ This extension contributes the following settings:
117120 " --project" ,
118121 " \" $project\" " ,
119122 " --startup-project" ,
120- " \" $project\" " ,
121- " --no-color" ,
122- " --json"
123+ " \" $project\" "
123124 ],
124125 "scaffold" : [
125126 " dotnet" ,
@@ -137,16 +138,40 @@ This extension contributes the following settings:
137138 " --context-dir" ,
138139 " \" $contextDir\" " ,
139140 " --namespace" ,
140- " \" $namespace\" " ,
141- " --no-color" ,
142- " --json"
141+ " \" $namespace\" "
142+ ],
143+ "generateERD" : [
144+ " dotnet" ,
145+ " ef" ,
146+ " dbcontext" ,
147+ " scaffold" ,
148+ " \" $connectionString\" " ,
149+ " \" $provider\" " ,
150+ " --context" ,
151+ " \" $context\" " ,
152+ " --project" ,
153+ " \" $project\" " ,
154+ " --output-dir" ,
155+ " \" $outputDir\" " ,
156+ " --use-database-names"
143157 ]
144158 }
145159 }
146160 ```
147161
148162 </details >
149163
164+ - ` entityframework.erDiagram.ignoreTables ` : A list of tables to ignore from the ER Diagram
165+ <details ><summary >Example</summary >
166+
167+ ``` json
168+ {
169+ "entityframework.erDiagram" : {
170+ "ignoreTables" : [" .*Tracking$" ]
171+ }
172+ }
173+ ```
174+
150175- ` entityframework.env ` : Custom environment variables
151176 <details ><summary >Example</summary >
152177
0 commit comments