Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 585 Bytes

Entity Framework.md

File metadata and controls

26 lines (21 loc) · 585 Bytes

Entity Framework

Tool Installation

In NuGet package manager console install dotnet-ef which is the entity framework command line tool:

dotnet tool install --global dotnet-ef

Adding a migration

  1. In Visual Studio, open the NuGet Package Manager Console
  2. Go to the BedBrigade/BedBrigade.Data directory. Example:
  3. Add a migration. Example:
    dotnet ef migrations add Addresses
    
  4. Update the database. Example:
    dotnet ef database update
    

Removing the last migration

dotnet ef migrations remove