DEV Community

Discussion on: Imagining a better EntityFramework

Collapse
 
jediderek profile image
Derek Welton

I'm interested in understanding what you mean with migration problems with Dapper. I can't offer an opinion for Entity since I've never used it before, I've only used Dapper. Structuring your objects that will hold the database data and having the dapper functions in a .net standard library would allow you to migrate to a desktop,web,or any environment. Do you mind explaining what you mean by migrate?

Collapse
 
ltvan profile image
Van Ly

EntityFramework support migration-driven database delivery as described in this article:
enterprisecraftsmanship.com/2015/0...

Collapse
 
cjboyle profile image
Connor Boyle

In this case, migrations build/update a database instance based on a set of model classes in code. For example, if you added an Age property to a PersonModel.cs class, you could call 'Add-Migration AddPersonAge' in powershell, which would generate something like AddPersonAge_timestamp.cs to your project's Migrations directory. Calling Update-Database will apply the migration to your database (add an age field to the Person table).