Package manager console commands

Hem / Teknik & Digitalt / Package manager console commands

If you don't agree to the terms, you should uninstall the package.

  • Adds a reference to the package in the project file and in Solution Explorer under the References node. RELATED LINKS about_EntityFrameworkCore REMARKS To see the examples, type: "get-help Get-DbContext -examples". For more information, type: "get-help Get-DbContext -detailed".

    package manager console commands

    REMARKS To see the examples, type: "get-help Add-Migration -examples".

    Get-Help Command

    PM> get-help entityframework _/\__ ---==/ \\ ___ ___ |. Remove-Migration Removes the last migration. For example, the following output is generated as a result of typing :

    Add-migration

    Notes

    The migration files will be placed in a folder named Migrations by default.

    Get-DbContext Gets information about a DbContext type. For technical information, type: "get-help Script-Migration -full". If you only want to script the most recent migration, the value to apply to the switch is the last migration that was applied. SEE ALSO Add-Migration Drop-Database Get-DbContext Remove-Migration Scaffold-DbContext Script-Migration Update-Database

    Add-Migration

    NAME Add-Migration SYNOPSIS Adds a new migration.

    Update-Database Updates the database to a specified migration. RELATED LINKS Update-Database about_EntityFrameworkCore REMARKS To see the examples, type: "get-help Drop-Database -examples". It should not be prefixed with a path separator (e.g. For more information, type: "get-help Drop-Database -detailed". For example, creates commands like , which generates ASP.NET MVC controllers and views:

    Set up a NuGet PowerShell profile

    You can create a PowerShell profile to make your commonly-used commands available in all PowerShell contexts, so you don't lose your PowerShell settings between sessions.

    For example, to find packages that contain the keyword , run the following command. These commands differ from the PackageManagement module commands you can use in a general PowerShell environment. For technical information, type: "get-help Remove-Migration -full".