Add azure db to mvc5 project

170 Views Asked by At

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

There are 2 best solutions below

0
On BEST ANSWER

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.

1
On

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.