0

I am currently studying software development and for a project I will be developing a database driven application in Asp.Net MVC. I am completely new to MVC but have experience in Asp.Net Web Forms.

I have done a small app using the Entity Framework Code First approach using the Local db. My question is if I start a website using the localdb can i then transfer the database to a seperate sql server database. Also if the database is not a localdb, can code first still create the tables in the seperate database as in the localdb

Thanks

  • If you are using code-first your application will write to wherever a valid connection string points it. Assuming you are referring to deploying the database and not migrating its data. That said, your seed method will allow you to take static data to each deployment. There is an excellent (and free) video tutorial here:http://www.asp.net/mvc/videos/pluralsight-building-applications-with-aspnet-mvc-4 – Lotok Nov 15 '13 at 14:17

1 Answers1

0

Yes, definitly, you can do that. When you want to migrate simply :

  • Generate script from localdb and run it on sqlserver
  • Create a new connection string to point to the new SQLserver database.

This should do the job: Here is tutorial that might help you.

Oualid KTATA
  • 1,116
  • 10
  • 20