Installing Entity Framework Core tools
The Entity Framework Core tool is the CLI tool for Entity Framework Core. In short, it enables you to run commonly used Entity Framework commands such as the following:
Add-Migration
: Adds a new migrationDrop-Database
: Drops the databaseGet-DbContext
: Lists and gets info aboutDbContext
typesScript-Migrations
: Creates SQL scripts for migrationUpdate-Database
: Updates the database to the latest migration
You can install this tool globally by running the following command in your Terminal on a Windows, Mac, or Linux machine:
dotnet tool install --global dotnet-ef
You will see the EF Core CLI tool in action in Chapter 5, Setting Up DbContext and Controllers, of this book.
Now you have learned what an EF Core tools CLI is and the commands that it can run.
In the next section, we will discuss which database provider to install, why you should install it, and how.