Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entity Framework 5 Nuget Console commands

Tags:

So I am making a DB with EF 5 Code first, I have checked some guides and found some "important"/useful commands like: "Update-Database -Force -Verbose". However I know there must be more commands like these, something like: "Purge-Database", but no success in finding them. So my question is, where can I find all the availible commands and flags(for example: -Force, -Verbose etc) for EF 5.

I tried google but no luck, since query "EF 5 Console" etc has console and it gives result about console applications, which I don t want ofc.

like image 539
Maximc Avatar asked Sep 04 '12 10:09

Maximc


People also ask

How do I run migration in Package Manager console?

Open the Package Manager Console from Tools → Library Package Manager → Package Manager Console and then run the enable-migrations command (make sure that the default project is the project where your context class is).

How do I open the package manager console in Visual Studio?

Open the project/solution in Visual Studio, and open the console using the Tools > NuGet Package Manager > Package Manager Console command.

How do I remove migration from Package Manager console?

Run "dotnet ef migrations remove" again in the command window in the directory that has the project. json file. Alternatively, run "Remove-Migration" command in the package manager console.


1 Answers

Just use:

get-help EntityFramework

to get list of supported commands and:

get-help Update-Database 

to get help for a queried command. Help for each command can give you information about extended help by for example using:

get-help Update-Database -detailed

You will probably be disappointed because there are only four commands provided by EF.

like image 96
Ladislav Mrnka Avatar answered Sep 20 '22 07:09

Ladislav Mrnka