The Command Line Interface (CLI) for Entity Framework Core

diakingdev
Feb 24, 2023

command cli entity framework core

The Command Line Interface (CLI) for Entity Framework Core provides a way to execute database commands from the command prompt or terminal.

You can not execute this command without installing the Entity Framework Core tools locally or globally.

Here are some of the most commonly used CLI commands for Entity Framework Core:

Creating a new migration:

Add-Migration <migration-name>

Applying pending migrations:

Update-Database

Applying a specific migration:

Update-Database -Migration <migration-name>

Removing the last migration:

Remove-Migration

Good Reading

--

--