Reputation: 5964
Is there any tool where I can draw Entity Framework models and it generates C# POCO classes and MSSQL DDL scripts from that?
Upvotes: 2
Views: 1112
Reputation: 4336
J. Tihon's answer was perfectly correct, but there is another alternative - write your POCO classes manually and forego the designer. You will still get POCO classes and the ability to generate SQL (using the power tool or Migrations, which will eventually be included in the core EF Nuget package). Code FIrst is a methodology many developers prefer for new development, and if you still want a visual designer there's always the Visual Studio class designer to help you design your POCOs!
Upvotes: 0
Reputation: 4459
Yes, it's called Visual Studio, but to get the POCO classes rather than the complex EntityObjects you have to replace the code-generation strategy. This ability was added in VS 2010 and can be applied directly in the designer. YOu can get the POCO T4 template from the Visual Studio Extension gallery. It also contains a description on how to use it.
The DDL generation is also built-in to the designer (but can also be modified using T4 and Workflows).
Basically you have to:
Upvotes: 4