Entity Framework Code First Migrations Commands

11 Jun

To enable migrations in your Entity Framework Code First project, the following commands guide you thru installation, enabling the migration, adding a migration and updating the database. All the commands are run on Package Manager Console.

Install EntityFramework package

PM> install-package EntityFramework

Enable Code First Migrations

PM> Enable-Migrations

Add a migration

PM> Add-Migration <migration_name>

Update the database

PM> Update-Database
Leave a comment

Posted by on June 11, 2013 in References


Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: