Microsoft.EntityFrameworkCore.Tools
3.0.0-preview.19074.3
Prefix Reserved
Requires NuGet 3.6 or higher.
dotnet add package Microsoft.EntityFrameworkCore.Tools --version 3.0.0-preview.19074.3
NuGet\Install-Package Microsoft.EntityFrameworkCore.Tools -Version 3.0.0-preview.19074.3
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0-preview.19074.3"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Microsoft.EntityFrameworkCore.Tools --version 3.0.0-preview.19074.3
#r "nuget: Microsoft.EntityFrameworkCore.Tools, 3.0.0-preview.19074.3"
// Install Microsoft.EntityFrameworkCore.Tools as a Cake Addin #addin nuget:?package=Microsoft.EntityFrameworkCore.Tools&version=3.0.0-preview.19074.3&prerelease // Install Microsoft.EntityFrameworkCore.Tools as a Cake Tool #tool nuget:?package=Microsoft.EntityFrameworkCore.Tools&version=3.0.0-preview.19074.3&prerelease
The Entity Framework Core tools help with design-time development tasks. They're primarily used to manage Migrations and to scaffold a DbContext and entity types by reverse engineering the schema of a database. Microsoft.EntityFrameworkCore.Tools is for PowerShell tooling that works in the Visual Studio Package Manager Console.
Getting started
The Package Manager Console (PMC) tools for Entity Framework Core perform design-time development tasks. For example, they create migrations, apply migrations, and generate code for a model based on an existing database. The commands run inside of Visual Studio using the Package Manager Console. These tools work with both .NET Framework and .NET Core projects.
Prerequisites
Before using the tools:
- Understand the difference between target and startup project.
- Learn how to use the tools with .NET Standard class libraries.
- For ASP.NET Core projects, set the environment.
Usage
PMC Command | Usage |
---|---|
Get-Help entityframework | Displays information about entity framework commands. |
Add-Migration | Creates a migration by adding a migration snapshot. |
Bundle-Migration | Creates an executable to update the database. |
Get-DbContext | Gets information about a DbContext type. |
Drop-Database | Drops the database. |
Get-Migration | Lists available migrations. |
Optimize-DbContext | Generates a compiled version of the model used by the DbContext . |
Remove-Migration | Removes the last migration snapshot. |
Scaffold-DbContext | Generates a DbContext and entity type classes for a specified database. This is called reverse engineering. |
Script-DbContext | Generates a SQL script from the DbContext. Bypasses any migrations. |
Script-Migration | Generates a SQL script using all the migration snapshots. |
Update-Database | Updates the database schema based on the last migration snapshot. |
Additional documentation
Feedback
If you encounter a bug or issues with this package,you can open an Github issue. For more details, see getting support.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.EntityFrameworkCore.Design (>= 3.0.0-preview.19074.3)
GitHub repositories (489)
Showing the top 5 popular GitHub repositories that depend on Microsoft.EntityFrameworkCore.Tools:
Repository | Stars |
---|---|
jellyfin/jellyfin
The Free Software Media System
|
|
dotnet/maui
.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
|
|
jasontaylordev/CleanArchitecture
Clean Architecture Solution Template for ASP.NET Core
|
|
ardalis/CleanArchitecture
Clean Architecture Solution Template: A starting point for Clean Architecture with ASP.NET Core
|
|
abpframework/abp
Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
|
Version | Downloads | Last updated |
---|---|---|
3.0.0-preview.19074.3 | 3 | 1/28/2019 |
3.0.0-preview.18572.1 | 0 | 11/30/2018 |