stian64
stian64

Reputation: 1683

Run Nuget command Update-Database for migration code first using Code

I am trying to find out if its possible to run the Nuget command in c#, so I can enable migrations to be run from a application pushing a button for example.

Upvotes: 1

Views: 372

Answers (1)

bricelam
bricelam

Reputation: 30425

Can you just use DbContext.Database.Migrate()? It would make your life considerably easier...

Upvotes: 1

Related Questions