Raja S
Raja S

Reputation: 21

How to enable the Migrations in My MVC5 Project?

Following Error i get it, Migrations is enabled for context 'ApplicationDbContext' but the database does not exist or contains no mapped tables. Use Migrations to create the database and its tables, for example by running the 'Update-Database' command from the Package Manager Consol

Upvotes: 0

Views: 3099

Answers (1)

Dmitriy Kovalenko
Dmitriy Kovalenko

Reputation: 3616

You need to perform this commands in Package Manager Consol

Enable-Migrations

Add-Migration "Initial"

Update-Database 

There you will have a database with migrations based on your models classes

Upvotes: 2

Related Questions