1

Where would I start in creating my Windows Workflow for Entity-Framework Database Generation from a Model? Where do I find the template for that? When I try to add a new item, Windows Workflow does not show up. MSDN doesn't have any documentation on how workflows work for generating to an Oracle database.

Bob.
  • 3,894
  • 4
  • 44
  • 76
  • Why do you need to create it yourselves? [Oracle's provider](http://www.oracle.com/technetwork/issue-archive/2011/11-sep/o51odt-453447.html) should already contain SSDL T4 file for generating Oracle DDL. Check [Model-first](http://download.oracle.com/oll/obe/EntityFrameworkOBE/EntityFrameworkOBE.htm) part. – Ladislav Mrnka Jun 21 '12 at 06:32
  • The problem with the one provided is from [this question](https://connect.microsoft.com/VisualStudio/feedback/details/478101/entity-framework-4-0-is-not-able-to-generate-database-schema-from-pocos). – Bob. Jun 21 '12 at 11:47
  • Still I don't understand why do you want to do that? If you are using model first the naming of tables should not be your concern. That is why you used [model first](http://stackoverflow.com/questions/5446316/ef-4-1-code-first-vs-model-database-first/5446587#5446587). If you care about database use database first and generate model from the database. Unless you are trying to do some open source project and providing result to others the effort needed for creating custom workflow / template doesn't worth it. – Ladislav Mrnka Jun 21 '12 at 11:56
  • Why should naming not be a concern? With the way it would be doing now, what happens if we have a root table and a child table that ends up being excessively long? i.e. `Dinosaur_Pterodactylus`. So, if I'm worried about how the table/column names are done, I should do database first? – Bob. Jun 21 '12 at 12:05
  • Generally yes, because you will get what you need with almost no additional costs but if your only concern is naming you can modify existing template instead of creating whole new one. – Ladislav Mrnka Jun 21 '12 at 12:43
  • How do I modify the template? In the _Generate Oracle Via T4 (TPT).xaml_ file, it only gives you the CSDL, SSDL, DDL and MSL files that are linked in creating it. What should I be looking for to be editing? – Bob. Jun 21 '12 at 12:54

1 Answers1

1

The Generate Oracle Via T4 (TPT) workflow just executes set of referenced T4 transformations. Just check the folder where this workflow is stored and there will be some Oracle specific transformation like CSDLtoMSL.tt and CSDLtoSSDL.tt - you need to change those two to use your new database naming convention.

Ladislav Mrnka
  • 360,892
  • 59
  • 660
  • 670
  • There aren't any of those files there. the _Generate Oracle Via T4 (TPT)_ file lists them in `xmlns:dbtk="clr-namespace:Oracle.VsDevTools;assembly=Oracle.VsDevTools"` – Bob. Jun 21 '12 at 13:42
  • 1
    In such case download Database generation power pack, get those templates out of oracle assembly (if they are still as resource) and use them in Generate SQL Via T4 workflow. If you will not be able to get templates from Oracle assembly you will have to use those templates provided in power pack and rewrite SSDL from SQL Server to Oracle dialect (provider, column types, etc.). – Ladislav Mrnka Jun 21 '12 at 14:02
  • Wow, complex. Ha. Well, this is going to be funky to figure out. Thanks! – Bob. Jun 21 '12 at 14:16