A set of WF4 Workflows and T4 templates to perform data and schema migration for the 'Generate Database from Model' feature of the Entity Designer. This also includes a "Workflow Manager" to help manage and edit workflows.
I agree this is a great extension. But be warned, if you are planning to migrate to VS 2012 soon, then don't use this. This won't work in VS2012. Please see the thread - http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/c63bf034-f205-4b4e-82e0-40b1c3fca71d
Sql Server Data Tools is what you should use for Sql Server 2012. Run Generate Database From Model. This will return you a script to create a new database. I actually edit the Database Generation tt4 script to do a drop database and create database at the beginning. Then run this script and you will have an empty database with the schema from the EDM. Then use the SSDT Compare Tool and target your database project. The compare tool will give you a check list of differences you can apply to your database project. Check the changes you want it make and the click Update. Now your database project schema will be synced with your EDM. Of Course you might still want other things in your database project like reporting stored procs or performance indexes. Just uncheck the Drop/Delete action on those during the compare process.
This tool is a phenomenal time savings. Generating a "sync database" project eliminated our need for in-house deployment and migration tools. Prior to this power pack, we really weren't interested in Database projects. Now, they are a great feature.
I look forward to this being included in the next version of the Entity Framework. My only concern is that this project is stagnating: I don't see bugs being addressed and I fear that it will not work with the next release of EF. It has been almost a year with no updates, despite the presence of bug reports.
Just started working with the Entity Designer Database Generation Power Pack and I must say it is a very solid first offering. Model first design is something new in EF4/VS 2010 and it's great to see a tool available that has evolved alongside VS 2010.
I was very happy to see that it comes with the ability to synchronize with a database project right out of the box. In my opinion, this is the most valuable feature. In the past, the actual production database was considered to be the "truth". As our tools have evolved, this has shifted to where the model, however stored, is the "truth".
When I want to generate database from the model that I had before, I found this error, what should I do? :(
Encountered the following errors while processing the template 'c:\program files(x86)\Microsoft visual studio 12.0\common7\ide\extensions\Microsoft\entity framework tools\dbgen\SSDLToSQL10.tt: Line0, Column 0: 'Compiling transformations: metadata file
'D:\program files(x86)\Microsoft visual studio 12.0\common 7\tools\..\ide\Microsoft.data.entity.design.databasegeneration.dll' could not be found'
Line 0,Column 0: 'Compiling transformation: Metadata file
'D:\program files(x86)\Microsoft visual studio 12.0\common 7\tools\..\ide\EntityFramework.dll' could not be found'
Line 0, Column 0: 'Compiling transformation: metadata file 'D:\program files(x86)\Microsoft visual studio 12.0\common 7\tools\..\ide\entityFramework.sqlServer.dll 'could not be found'
Line 0, column 0: 'Compiling transformation: Metadata file
'D:\program files(x86)\Microsoft visual studio 12.0\common 7\tools\..\ide\entityFramework.SqlServerCompact.dll'could not be found'
I was so tired to wait for a VS2012 version that I managed to create my own extension.
I reproduced a small part of the features :
TPT / TPH script generation and database project update.
The extension is named "Edmx Database Sync".
Hi, I have the following problem when I want to migrate the database;
"The source database schema provider Sql100DatabaseSchemaProvider can not be translated to provider Sql90DatabaseSchemaProvider."
I'm using VS2010, EF4.1, and SQLServer 2005.
Can anyone give me some help? Thank you very much..
It seems you are not planning to continue this power pack. Could you please put the source code of this extension on CodePlex. This way people could make it available for VS2012 and EF5. I bet it would be easier for everyone to let the public implement VS2012 support than rather wait for any update here.
I was just wondering if this power pack is planned for release with visual studio 2012 and EF5 any time soon? I am about to embark on a bit of a re factor of a project as I am running into performance issues with TPT. If I had TPH my problems would all go away ;) Just wondering if to wait or not, or if there are any alternatives out there? I am using EF5 model first with spatial and enums.
Please tell me my mistakes or some workarounds for my case below.
It seems to be the same that Maverjk said before.
1. Right-click in edmx designer and show Database Generation Workflow Manager.
2. Select a item in left pane. - I can select any to repro.
3. Click "Select Workflow for Database Generation" in right pane.
The green check will never shows with no errors.
4. Click "Next".
5. Progress Bar is shown and successfully proceeded.
Drop and Create SQL scripts are generated and shown.
Which workflow I selected at first step, the generated SQL scritps are same:
it seems to be my selection is not applied.
If I manually select "CSDLToMSL_TPT.tt (VS)" template and "Generate Migration T-SQL.xaml (VS)" workflow
in model designer property grid and generate database with Database Generation Workflow Manager,
it causes error like below.
Error occured in processing 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\DBGen\CSDLToMSL_TPT.tt'
At Line 0, Col 0: Converting.
ArgumentNullException: Can't set value to null.
Parameter Name: s
CSDLToMSL_TPT.tt: line 99
(sorry for error message summary, because of orginal one is japanese)
My environment is
Windows XP Pro. SP3
Visual Studio 2010 Pro. SP1
Entity Designer Database Generation Power Pack 1.2 that I downloaded from this page now.
In Extension Manager the version is "1.0".
The "Database Generation Workflow Manager" shows "v1.1".
I've imported via "update model from db" a stored procedure.
I created automatically the associate complex type and at the end I checked if edmx file has everything.
Then I ran the "generate db from model" and in the Model Browser (and in the edmx file) the definition of stored procedure has been disappeared. Is this a bug or I'm wrong in doing something?
I've two issues using power pack.
First is when I modify the model a lot and have some data in database I've got the message " rows were detected ... " and I cannot migrate.
Second for the above-mentioned reason I use dacpac and perform 'schema comparision' in the VS.
However the dacpac is not correctly generated. In edmx model entites have nullable properties but dacpac have tables with all 'not null' allowed columns.
Thanks for any help.