To deploy a Code First database to an Azure Web Site, you can use the Execute Code First Migrations check box in the Publish Web wizard: When you select that check box, Visual Studio configures the destination web site so that Entity Framework automatically deploys the database or updates it by running the MigrateDatabaseToLatestVersion initializer on application start, as explained in this VS web deployment tutorial . But if you’re deploying to an Azure cloud service you don’t get to use the Publish Web wizard. What then? In that case, you have two options: Write code that executes migrations when the application starts. Write Web.config transforms to configure the MigrateDatabaseToLatestVersion initializer to run. Write App_Start...(read more)
Go to the complete details ...