0

I want to trigger database migration through code to latest version.

I have already configured the migrations and they work fine but the only way I can get them to migrate is by querying the database which I think shouldn't be needed.

I am sure I have just missed something in the documentation to trigger the migration but if someone can point me in the right direction it will be much appreciated.

1 Answer 1

1

I found a related article that answered this all I need to do is call Database.Initialize(false); in my routine to upgrade the database.

Entity framework 4.3 run migrations at application start

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.