I’m trying to deploy an MVC app to a server which is running IIS 7 and has SQL Server 2008 R2. I have set up web config transformations so that I can dev on my local machine with Sql Server CE and added a connection string in the Release config so that it points to a new (empty) database I created on the server. The application is written code first.
How do I generate the required tables for the application on the server? I have tried to deploy my app through VS publish using File System as the publish method but this does not do anything on the database side. Do I need to use Web Deploy as the publish method (would this make a difference)? A database initalise strategy such as CreateDatabaseIfNotExists?
Completely at a loss here so any tips or links to walkthroughs would be appreciated.
As Scott Gu explains it in this blog post, in addition to web config transformations you could also perform database deployments during the publishing process: