You are developing a database based on the First model, so you have all the controls in generating / modifying the database.
You do not need to migrate the database, but in visual studio you can recreate the database in SQL Server 2012.
To create a database in sql 2012, follow the same steps as you to create a database for sql 2014 in visual studio, just for a reminder:
- On the EDMX design surface, right-click → Create a database from the model. Follow the wizard and create a new connection to sql2012.
At the end of the wizard, a new database is created in SQL Server 2012.
Sql script is also automatically generated with a name, for example. model.edmx.sql, including all object DDLs and associations, ...
Output the script in VS, you can select the connection and execute the script on the new 2012 database server.
For data, you can use the bcp utility or the export wizard to SSMS.
Update:
In the approach of the First model, you create a diagram that will be automatically converted to an encoded model and the model will be saved in EDMX (xml file).
If the project does not have EDMX, this means that you did not use the ModelFirst approach, but you can use the MVC project template, which automatically creates a database at the beginning of the project.
An advantage of the First model is the ease of change and synchronization between the development environment and production for future changes.
You can redesign your project and add a ModelFirst approach, even if you created the database.
From there, you can re-create the database on sql 2012 server. I will describe a walkthrough to create your mode:
Creating a DataModel from an Existing Database in EntityFramework 6 For ModelFirst Approach
source share