I've created an ASP.NET MVC / WebAPI 2 web application on my local environment. I am using LocalDb for my development purposes and I follow the EF "Code First" approach (I've written all my model classes and run migrations when needed). On my local environment, everything works fine.
I thought it would be a good idea to publish the app on Azure to test it out. I have created Web App + SQL instances and I am able to connect to them. I have managed to publish the website part, but unfortunately, I am not able to publish the database.
E.g. when I visit .azurewebsites.net, the page loads - but as soon as I try to log in, I get an error saying:
Cannot find the object “dbo.Locations” because it does not exist or you do not have permissions
This tells me that my tables have not successfully migrated over (even though I checkmarked "execute code-first migrations" in the "publish" wizard).
I have been trying to find a solution for 2 days now, to no avail. I have seen many that say that I need to migrate to SQL Server locally, then only will it work on Azure - however, I cannot find a way to export my data from LocalDb to SQL Server (I could not find that option even in SSMS).
Also, I found a guide - http://www.asp.net/mvc/overview/getting-started/database-first-development/creating-the-web-application - but when it comes to database publishing, it says to simply right click on the database solution and select "Publish" - I do not have a Database project/solution - for me, it's just one mdf file.
I am very new to ASP.NET so I would appreciate any help. Thank you!