Visual Studio 2013 (ASP.Net MVC, code first w/ migrations) -> Visual Studio Online -> Azure RRS feed

  • Question

  • User-2116612443 posted

    I built an application in Visual Studio 2013, using ASP.Net MVC.  I'm using code first, and have enabled migrations.  I've been checking my code into Visual Studio Online.  So, I set up my Azure account, and got the Visual Studio Online account linked to Azure easily enough.  I can go to the Visual Studio Online web site, and build my project, and it automatically deploys to Azure.  I should be able to do the same from within Visual Studio 2013, but haven't gotten in front of it to try it yet.

    So now I'm stuck.  The project compiles and deploys just fine.  But there's no database.  But how do I get my deployment to run the migrations against an Azure SQL DB and have my app link to that DB?  I've been scouring the net for documentation on how to do this, but I'm coming up with nothing.  Surely there's a way to do this?  Why else would I want it to automatically deploy my compiled app to Azure, if it doesn't manage the database too?

    I tried creating an SQL DB in Azure, and linked it to the Web Site, but that didn't do anything.  The SQL DB gives me a connection string, but I can't imagine having to manually plug that into my code every time.  Can anybody help me out here?

    Wednesday, December 18, 2013 5:29 PM

All replies