Or: Quirks of Using Entity Designer Database Generation Power Pack
If you’re searching for a way to synchronise a “Visual Studio Database Project” (also known as “SQL Server Database Project” or “TSData Project”) with an Entity Framework model, you’ve probably already encountered the “Entity Designer Database Generation Power Pack”.
With model first development, the most basic use case is to synchronise the database project with the model. If you are trying to achieve this, you need to be aware of conventions that have been baked into the tool:
- Your “.edmx” file must have the same name as the “.dbproj” (i.e. database project name).
- It is just the file name of the model that is important.
- Neither the “Namespace” or “Entity Container Name” properties of the model need to match the file name. In fact, you will not be able to use names containing full-stops/periods (“.”) in these properties, but you may well require that for the file name if you’ve named your database project in this fashion.
- It is just the file name of the database project that is important too. The name of the
- Your database project must lie in the root of the solution structure. i.e. do not put your database project in a solution folder.
Footnote
There won’t be any more development of the “Entity Designer Database Generation Power Pack”, as the functionality is being provided as part of the “SQL Server Developer Tools”, code named Juneau. This would be the better toolset to use to satisfy this use case.