O'Reilly logo

Learning Angular for .NET Developers by Rajesh Gunasundaram

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using DB Migration

DB migration in Entity Framework helps you create a database or update a database schema during the application's development phase. We now have the required model and database context in place. We need to create the database now. Let's create the database in SQL Server Compact using the feature called database migration in Entity Framework. Follow these steps to do so:

  1. First, add the following XML tags to the csproj file by editing it:
  <ItemGroup>       <DotNetCliToolReference        Include="Microsoft.EntityFrameworkCore.Tools.DotNet"      Version="1.0.0" />     </ItemGroup>   
  1. Open Command Prompt and navigate to the project folder.

 

  1. Execute the following command to initialize the database for migration:
Execute the command to add ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required