Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use MVC4 Migrations without using Entity Frameworks?

How can I use MVC4 Migrations without using Entity Frameworks? I would really like to use data migrations but I am not using Entity Frameworks. I am using dapper-dot-net.

like image 205
Jamey McElveen Avatar asked Jun 07 '12 13:06

Jamey McElveen


1 Answers

Yes, you can use Migrations without using Entity Framework. All Migrations cares about is the metadata it uses to manage the database and you need to use some EF stuff to handle that, but you then don't ever need to use EF to actually access the database. This blog post describes the process in detail: http://weblogs.asp.net/fredriknormen/archive/2012/02/15/using-entity-framework-4-3-database-migration-for-any-project.aspx

like image 102
Arthur Vickers Avatar answered Nov 16 '22 17:11

Arthur Vickers