entity framework db first

165 Views Asked by At

I have built my MVC 5 project based on entity framework Database First approach by following video tutorials. But what I have obtained is the model. There is nothing in the app_data folder. I want to obtain the .mdf file as well so that I can deploy the database to the azure.

Note: I'm using the server explorer database in VS2013.

1

There are 1 best solutions below

3
On

I dont think you will be getting any .mdf files on app_data folder. To deploy your database to Azure:

  1. Right click your database on SQL server, then Tasks->Generate Scripts. On scripting options, select sql azure server

enter image description here

  1. Login to your azure account and create a SQL server and run generated script from the portal by clicking the link below:

enter image description here

  1. while creating your EF connection, use the connection string for your Azure Database like: enter image description here

    At the end you should be ready to use your ORM.