ErikEJ.EFCorePowerTools.Cli 7.1.199-nightly

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
This is a prerelease version of ErikEJ.EFCorePowerTools.Cli.
There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global ErikEJ.EFCorePowerTools.Cli --version 7.1.199-nightly
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local ErikEJ.EFCorePowerTools.Cli --version 7.1.199-nightly
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=ErikEJ.EFCorePowerTools.Cli&version=7.1.199-nightly&prerelease
nuke :add-package ErikEJ.EFCorePowerTools.Cli --version 7.1.199-nightly

EF Core Power Tools CLI

Cross platform command line tool for advanced EF Core reverse engineering. See the full guide explaining all the features here.

Getting started

The tool runs on any operating system with the .NET 6.0 / .NET 8.0 runtime installed.

For a quick intro you can watch this 2 minute demo video.

Installing the tool

EF Core 8:

dotnet tool install ErikEJ.EFCorePowerTools.Cli -g --version 8.*

EF Core 7:

dotnet tool install ErikEJ.EFCorePowerTools.Cli -g --version 7.*

EF Core 6:

dotnet tool install ErikEJ.EFCorePowerTools.Cli -g --version 6.*

Running the tool

From the folder where you want the code to be generated (usually where your .NET project is located)

efcpt "Server=(local);Initial Catalog=Northwind;User id=user;Pwd=secret123;Encrypt=false" mssql

Type efcpt --help for help on command line options.

The provider name (mssql) may not be required, as an attempt is made to resolve the provider from the connection string.

Configuring options

A configuration file efcpt-config.json is created in the output folder, and you can open this file in your editor to modify the default options. If your editor supports it (for example VS Code), it will provide syntax guidance for the file. For reference there is a fully populated sample file here.

Updating to new configuration

After updating the efcpt-config.json, you will need to run the efcpt CLI command from above once again in order to update the generated code.

If you have updated the configuration file in a way that requires files to be deleted - by excluding objects for example - then you will need to set the "soft-delete-obsolete-files" option in the configuration file to true or delete the files manually.

Excluding objects

The config file defaults to always contain all current database objects.

If you don't want the lists of objects to be refreshed during each scaffolding operation, set the "refresh-object-lists" option in the configuration file to false.

You can exclude indvidual database objects with "exclude": true for the object.

You can also use the exclusionWildcard item under each type of data object to filter included objects.

You can use the following filter expressions:

  • *: Exclude all objects in section. Overrides all other filters.
  • abc*: Exclude all objects in section that starts with abc. Multiple filters allowed.
  • *xyz: Exclude all objects in section that ends with xyz. Multiple filters allowed.
  • *mno*: Exclude all objects in section that contains mno. Multiple filters allowed.

Filters will apply unless "exclude": false is explicitly set for a database object.

All filters are case sensitive.

"tables": [
      {
         "exclusionWildcard": "*"
      },
      {
         "name": "[dbo].[Users]",
         "exclude": false
      },
      {
         "name": "[dbo].[Messages]"
      }
  ],

In the example above, only the Users table will be selected.

"tables": [
      {
         "exclusionWildcard": "[other].*"
      },
      {
         "name": "[dbo].[Users]",
         "exclude": false
      },
      {
         "name": "[other].[Accounts]"
      },      
      {
         "name": "[other].[Messages]"
      }
  ],

In the example above, Users and Messages tables will be selected.

Generate a Mermaid ER diagram

The tool can generate a Mermaid ER diagram during exectution, just set the code-generation option generate-mermaid-diagram to true and a dbdiagram.md file will be created in the output folder.

Updating the tool

dotnet tool update ErikEJ.EFCorePowerTools.Cli -g --version 8.*

Release notes - notice the +CLI label.

Getting the latest daily build

dotnet tool update ErikEJ.EFCorePowerTools.Cli -g --version 8.*-*
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
8.1.219-nightly 72 5/15/2024
8.1.218-nightly 48 5/15/2024
8.1.217-nightly 59 5/14/2024
8.1.215-nightly 63 5/13/2024
8.1.210-nightly 52 5/12/2024
8.1.209-nightly 53 5/12/2024
8.1.207-nightly 78 5/10/2024
8.1.206 604 5/9/2024
8.1.206-nightly 66 5/10/2024
8.1.204-nightly 108 5/8/2024
8.1.202-nightly 98 5/8/2024
8.1.200-nightly 106 5/2/2024
8.1.199-nightly 94 5/2/2024
8.1.198-nightly 127 5/1/2024
8.1.197-nightly 113 5/1/2024
8.1.195-nightly 172 4/30/2024
8.1.193-nightly 130 4/30/2024
8.1.192-nightly 119 4/30/2024
8.1.188-nightly 83 4/29/2024
8.1.186-nightly 87 4/29/2024
8.1.182-nightly 126 4/26/2024
8.1.180-nightly 126 4/26/2024
8.1.178-nightly 137 4/24/2024
8.1.170-nightly 240 4/12/2024
8.1.169-nightly 120 4/12/2024
8.1.161-nightly 264 4/5/2024
8.1.157-nightly 180 4/4/2024
8.1.151-nightly 223 3/29/2024
8.1.150-nightly 244 3/26/2024
8.1.149-nightly 161 3/24/2024
8.1.148 3,107 3/23/2024
8.1.147-nightly 174 3/19/2024
8.1.145-nightly 124 3/18/2024
8.1.137-nightly 184 3/14/2024
8.1.136-nightly 203 3/14/2024
8.1.131-nightly 174 3/13/2024
8.1.128-nightly 110 3/11/2024
8.1.126-nightly 211 3/8/2024
8.1.120-nightly 176 3/2/2024
8.1.119-nightly 130 2/29/2024
8.1.118-nightly 122 2/28/2024
8.1.115-nightly 146 2/26/2024
8.1.110-nightly 169 2/26/2024
8.1.105-nightly 172 2/18/2024
8.1.104-nightly 132 2/18/2024
8.1.103-nightly 119 2/17/2024
8.1.101-nightly 132 2/16/2024
8.1.100 2,350 2/14/2024
8.1.99-nightly 78 2/14/2024
8.1.98-nightly 185 2/13/2024
8.1.97-nightly 136 2/12/2024
8.1.94-nightly 210 2/7/2024
8.1.92-nightly 86 2/6/2024
8.1.79-nightly 104 1/31/2024
8.1.72-nightly 102 1/28/2024
8.1.71-nightly 133 1/28/2024
8.1.70-nightly 102 1/26/2024
8.1.69-nightly 102 1/26/2024
8.1.68-nightly 111 1/25/2024
8.1.67-nightly 119 1/23/2024
8.1.66-nightly 74 1/22/2024
8.1.63-nightly 94 1/22/2024
8.1.57-nightly 89 1/21/2024
8.1.50-nightly 124 1/19/2024
8.1.49-nightly 83 1/19/2024
8.1.45-nightly 93 1/15/2024
8.1.43-nightly 167 1/15/2024
8.1.41 1,508 1/12/2024
8.1.40 197 1/11/2024
8.1.37-nightly 130 1/11/2024
8.1.36-nightly 195 1/11/2024
8.1.35-nightly 137 1/11/2024
8.1.29-nightly 133 1/11/2024
8.1.28-nightly 134 1/11/2024
8.1.27-nightly 124 1/11/2024
8.1.21-nightly 148 1/10/2024
8.1.20-nightly 128 1/10/2024
8.1.14-nightly 113 1/10/2024
8.1.13-nightly 92 1/10/2024
8.1.12-nightly 125 1/10/2024
8.1.1 222 1/11/2024
8.0.1720 413 1/12/2024
8.0.1718 1,511 12/14/2023
8.0.1707 1,215 12/7/2023
8.0.1694 968 11/27/2023
8.0.1500 176 1/12/2024
8.0.0 1,531 11/15/2023
8.0.0-rc.16 164 11/1/2023
8.0.0-rc.15 118 11/1/2023
8.0.0-rc.14 114 10/27/2023
8.0.0-rc.13 122 10/23/2023
8.0.0-rc.12 169 10/15/2023
8.0.0-rc.11 257 9/12/2023
8.0.0-rc.10 286 8/25/2023
8.0.0-rc.9 148 8/25/2023
8.0.0-rc.8 233 8/11/2023
7.1.219-nightly 64 5/15/2024
7.1.218-nightly 43 5/15/2024
7.1.217-nightly 52 5/14/2024
7.1.215-nightly 59 5/13/2024
7.1.210-nightly 50 5/12/2024
7.1.209-nightly 48 5/12/2024
7.1.207-nightly 57 5/10/2024
7.1.206 190 5/9/2024
7.1.206-nightly 64 5/10/2024
7.1.204-nightly 101 5/8/2024
7.1.202-nightly 98 5/8/2024
7.1.200-nightly 102 5/2/2024
7.1.199-nightly 104 5/2/2024
7.1.198-nightly 108 5/1/2024
7.1.197-nightly 112 5/1/2024
7.1.195-nightly 158 4/30/2024
7.1.193-nightly 123 4/30/2024
7.1.192-nightly 130 4/30/2024
7.1.188-nightly 85 4/29/2024
7.1.186-nightly 84 4/29/2024
7.1.182-nightly 142 4/26/2024
7.1.180-nightly 125 4/26/2024
7.1.178-nightly 129 4/24/2024
7.1.170-nightly 249 4/12/2024
7.1.169-nightly 194 4/12/2024
7.1.161-nightly 212 4/5/2024
7.1.157-nightly 152 4/4/2024
7.1.151-nightly 174 3/29/2024
7.1.150-nightly 222 3/26/2024
7.1.149-nightly 162 3/24/2024
7.1.148 412 3/23/2024
7.1.147-nightly 152 3/19/2024
7.1.145-nightly 172 3/18/2024
7.1.137-nightly 139 3/14/2024
7.1.136-nightly 177 3/14/2024
7.1.131-nightly 190 3/13/2024
7.1.128-nightly 146 3/11/2024
7.1.126-nightly 115 3/8/2024
7.1.120-nightly 170 3/2/2024
7.1.119-nightly 127 2/29/2024
7.1.118-nightly 178 2/28/2024
7.1.115-nightly 158 2/26/2024
7.1.110-nightly 199 2/26/2024
7.1.105-nightly 104 2/18/2024
7.1.104-nightly 146 2/18/2024
7.1.103-nightly 75 2/17/2024
7.1.101-nightly 89 2/16/2024
7.1.100 350 2/14/2024
7.1.99-nightly 105 2/14/2024
7.1.98-nightly 141 2/13/2024
7.1.97-nightly 144 2/12/2024
7.1.94-nightly 93 2/7/2024
7.1.92-nightly 94 2/6/2024
7.1.79-nightly 109 1/31/2024
7.1.72-nightly 129 1/28/2024
7.1.71-nightly 106 1/28/2024
7.1.70-nightly 97 1/26/2024
7.1.69-nightly 96 1/26/2024
7.1.68-nightly 96 1/25/2024
7.1.67-nightly 83 1/23/2024
7.1.66-nightly 78 1/22/2024
7.1.63-nightly 73 1/22/2024
7.1.57-nightly 95 1/21/2024
7.1.50-nightly 75 1/19/2024
7.1.49-nightly 103 1/19/2024
7.1.45-nightly 101 1/15/2024
7.1.43-nightly 104 1/15/2024
7.1.41 214 1/12/2024
7.1.40 156 1/11/2024
7.1.37-nightly 64 1/11/2024
7.1.36-nightly 102 1/11/2024
7.1.35-nightly 136 1/11/2024
7.1.29-nightly 117 1/11/2024
7.1.28-nightly 94 1/11/2024
7.1.27-nightly 114 1/11/2024
7.1.21-nightly 116 1/10/2024
7.1.20-nightly 111 1/10/2024
7.1.14-nightly 154 1/10/2024
7.1.13-nightly 127 1/10/2024
7.1.12-nightly 98 1/10/2024
7.1.1 218 1/11/2024
7.0.1720 265 1/12/2024
7.0.1718 495 12/14/2023
7.0.1707 393 12/7/2023
7.0.1694 384 11/27/2023
7.0.1500 163 1/12/2024
7.0.0 1,002 11/15/2023
7.0.0-rc.16 174 11/1/2023
7.0.0-rc.15 80 11/1/2023
7.0.0-rc.14 148 10/27/2023
7.0.0-rc.13 92 10/23/2023
7.0.0-rc.12 193 10/15/2023
7.0.0-rc.11 546 9/12/2023
7.0.0-rc.10 227 8/25/2023
7.0.0-rc.9 116 8/25/2023
7.0.0-rc.8 194 8/11/2023
7.0.0-rc.7 873 7/18/2023
7.0.0-rc.6 154 7/17/2023
7.0.0-rc.5 151 7/16/2023
7.0.0-rc.4 171 7/10/2023
7.0.0-rc.3 158 6/7/2023
7.0.0-rc.2 99 5/30/2023
7.0.0-rc.1 82 5/28/2023
7.0.0-preview9 325 5/26/2023
7.0.0-preview8 183 5/23/2023
7.0.0-preview7 224 5/19/2023
7.0.0-preview6 290 5/5/2023
7.0.0-preview5 311 5/4/2023
7.0.0-preview4 256 4/30/2023
7.0.0-preview3 345 4/27/2023
7.0.0-preview2 259 4/25/2023
7.0.0-preview10 181 5/28/2023
7.0.0-preview1 403 4/25/2023
7.0.0-preview.11 78 5/28/2023
6.1.219-nightly 65 5/15/2024
6.1.218-nightly 46 5/15/2024
6.1.217-nightly 53 5/14/2024
6.1.215-nightly 55 5/13/2024
6.1.210-nightly 45 5/12/2024
6.1.209-nightly 48 5/12/2024
6.1.207-nightly 59 5/10/2024
6.1.206 81 5/9/2024
6.1.206-nightly 60 5/10/2024
6.1.204-nightly 101 5/8/2024
6.1.202-nightly 94 5/8/2024
6.1.200-nightly 114 5/2/2024
6.1.199-nightly 103 5/2/2024
6.1.198-nightly 114 5/1/2024
6.1.197-nightly 117 5/1/2024
6.1.195-nightly 148 4/30/2024
6.1.193-nightly 135 4/30/2024
6.1.192-nightly 119 4/30/2024
6.1.188-nightly 92 4/29/2024
6.1.186-nightly 85 4/29/2024
6.1.182-nightly 124 4/26/2024
6.1.180-nightly 132 4/26/2024
6.1.178-nightly 138 4/24/2024
6.1.170-nightly 146 4/12/2024
6.1.169-nightly 163 4/12/2024
6.1.161-nightly 175 4/5/2024
6.1.157-nightly 181 4/4/2024
6.1.151-nightly 192 3/29/2024
6.1.150-nightly 127 3/26/2024
6.1.149-nightly 178 3/24/2024
6.1.148 792 3/23/2024
6.1.147-nightly 171 3/19/2024
6.1.145-nightly 162 3/18/2024
6.1.137-nightly 176 3/14/2024
6.1.136-nightly 181 3/14/2024
6.1.131-nightly 78 3/13/2024
6.1.128-nightly 161 3/11/2024
6.1.126-nightly 178 3/8/2024
6.1.120-nightly 218 3/2/2024
6.1.119-nightly 182 2/29/2024
6.1.118-nightly 79 2/28/2024
6.1.115-nightly 172 2/26/2024
6.1.110-nightly 130 2/26/2024
6.1.105-nightly 181 2/18/2024
6.1.104-nightly 130 2/18/2024
6.1.103-nightly 99 2/17/2024
6.1.101-nightly 177 2/16/2024
6.1.100 306 2/14/2024
6.1.99-nightly 129 2/14/2024
6.1.98-nightly 134 2/13/2024
6.1.97-nightly 147 2/12/2024
6.1.94-nightly 151 2/7/2024
6.1.92-nightly 123 2/6/2024
6.1.79-nightly 93 1/31/2024
6.1.72-nightly 141 1/28/2024
6.1.71-nightly 108 1/28/2024
6.1.70-nightly 75 1/26/2024
6.1.69-nightly 128 1/26/2024
6.1.68-nightly 101 1/25/2024
6.1.67-nightly 103 1/23/2024
6.1.66-nightly 83 1/22/2024
6.1.63-nightly 88 1/22/2024
6.1.57-nightly 116 1/21/2024
6.1.50-nightly 67 1/19/2024
6.1.49-nightly 101 1/19/2024
6.1.45-nightly 100 1/15/2024
6.1.43-nightly 107 1/15/2024
6.1.41 211 1/12/2024
6.1.40 181 1/11/2024
6.1.37-nightly 113 1/11/2024
6.1.36-nightly 105 1/11/2024
6.1.35-nightly 152 1/11/2024
6.1.29-nightly 126 1/11/2024
6.1.28-nightly 127 1/11/2024
6.1.27-nightly 147 1/11/2024
6.1.21-nightly 148 1/10/2024
6.1.20-nightly 175 1/10/2024
6.1.14-nightly 181 1/10/2024
6.1.13-nightly 73 1/10/2024
6.1.12-nightly 124 1/10/2024
6.1.1 197 1/11/2024
6.0.1720 248 1/12/2024
6.0.1718 417 12/14/2023
6.0.1707 345 12/7/2023
6.0.1694 342 11/27/2023
6.0.1500 201 1/12/2024
6.0.0 6,161 11/15/2023
6.0.0-rc.16 114 11/1/2023
6.0.0-rc.15 91 11/1/2023
6.0.0-rc.14 15,617 10/27/2023
6.0.0-rc.13 64 10/23/2023
6.0.0-rc.12 122 10/15/2023
6.0.0-rc.11 148 9/12/2023
6.0.0-rc.10 2,159 8/25/2023
6.0.0-rc.9 115 8/25/2023
6.0.0-rc.8 137 8/11/2023
6.0.0-rc.7 4,792 7/18/2023
6.0.0-rc.5 358 7/16/2023
6.0.0-rc.4 150 7/10/2023
6.0.0-rc.3 101 6/7/2023
6.0.0-rc.2 102 5/30/2023
6.0.0-rc.1 86 5/28/2023
6.0.0-preview9 175 5/26/2023
6.0.0-preview8 152 5/23/2023
6.0.0-preview7 195 5/19/2023
6.0.0-preview6 221 5/5/2023
6.0.0-preview5 322 5/3/2023
6.0.0-preview4 240 4/30/2023
6.0.0-preview3 218 4/27/2023
6.0.0-preview2 299 4/25/2023
6.0.0-preview10 229 5/28/2023

For EF Core 7