Enable Migrations Visual Studio For Mac

This article is rather small, but its target is to remind me how to enable migrations of database in Visual Studio.

Thus, the steps are:

Days

  1. Press Ctrl + Q to go to the quick launch.
  2. In the quick launch write “Package Manager Console” and press enter.
  3. Make sure that you have selected the correct Default project in the console.
  4. In the console write> Enable-Migrations -EnableAutomaticMigrations and press enter.
  5. In the solution explorer, you get a folder migrations, in which a file Configuration.cs is present.
  6. If you open it, you may configure it this way (just an example, do not ever do AutomaticMigrationDataLossAllowed = true in production):

The Package Manager Console is a PowerShell console within Visual Studio used to interact with NuGet and automate Visual Studio. You can access the Package Manager Console from within Visual Studio by going to Tools - Library Package Manager - Package Manager Console. The following is a screen shot for the console. Use the Visual Studio debugger to quickly find and fix bugs across languages. The Visual Studio for Mac debugger lets you step inside your code by setting Breakpoints, Step Over statements, Step Into and Out of functions, and inspect the current state of the code stack through powerful visualizations.

Studio

Visual Studio For Mac Tutorial

Visual studio for mac review
configuration.cs
2
4
6
{
this.AutomaticMigrationsEnabled=true;
}

Enable Migrations Visual Studio For Mac Free

And that is it!

Enable Migrations Visual Studio For Mac Download

Related posts:

Enable Migrations Visual Studio For Mac Os

Tagged with: Enable Migrations Visual Studio, Entity Framework