Click here to Skip to main content
14,661,418 members
Rate this:
Please Sign up or sign in to vote.
I'm trying to publish a MVC6 EF7 project to Azure using VS2015. The project contains 2 DB Contexts: ApplicationDbContext (containing Identity info) and BaseDbContext (containing my project specific schema). I've used the dnx ef migrations tool to enable data scripting. Package Manager Console enable-migrations no longer works? When I publish the project to Azure using the new Publish Web tool, I don't see the Databases section on the wizard. How do I tell the system to point to an existing Azure database? After publishing the site comes up but when I hit a page that uses BaseDbContext, I get an error. I am able to register using ApplicationDbContext. My questions:

How to I tell the system to run script to instantiate BaseDbContext data structure?

How do I change the Azure database the system points to?

What happened to the old Package Manager Console "enable-migrations"? Is there something I need to do to reenable?

What I have tried:

My original project did not specify an azure database element. I don't know where I specify this information after the project is created. I built a new project to troubleshoot, this time creating the Azure database at creation. But only the default ApplicationDbContext publishes, not BaseDbContext.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100