locked
Windows Azure - how to generate EF database? RRS feed

  • Question

  • User-8497286 posted

    I created website using asp.net MVC with Entity Framework Code First. It worked before on Windows Azure, the site was available publicly.

    For some reason, I deleted database that was used to store data of my webpage. I created new one, similar to previous one.

    I properly connected my site to database (in solution I clicked "Publish", in "Settings" there is place to type data about database, in "Destination Connection String" window I typed all needed data and clicked "Test Connection" - everything seems to be fine)

    I published my site, the site works correctly, but when I go to page that gets data from database is see this error:

    Invalid object name 'dbo.AspNetUsers'.

    In Visual Studio in "SQL Server Explorer" I can see what is in my database. In fact, there is nothing inside (there is one table: "__MigrationHistory" and as I suspect this is created by default).

    How can I generate all those tables again?

    Accidentally I deleted "migations" from my project, do you think this is the cause?

    This is not my projects blame, it works OK on localhost on my computer, when I delete localDB, it generates new one without any problem.

    Friday, February 6, 2015 5:17 AM

Answers