2

I have a MVC 5 project using visual studio 2013.

How can I add/create a database in azure from visual studio so that EF6 code first can just use and create the models?

I've been browsing server explorer but there is nothing there related to azure.

2 Answers 2

2

I think that you need to create the DB in Azure from the Azure control panel. Once it is there, EF can use the connection string for Azure to add tables/data to an existing DB.

Due to the configuration requirements of Azure DB, I haven't found any option but the control panel to do this.

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

Comments

2

You should create your DB on Azure first then fetch data from Azure SQL same as you access from normal SQL server.

Same process to follow to create models from DB.

1 Comment

you mentioned in your question that you are using EF code first, don't you? Also as far as I know, in code first, you have to create your model classes first with context class and then create DB.

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.