One Model to Rule Them All - VS2010 UML, ADO.NET Entity Data Model, and T4

Posted by Eric J. on Stack Overflow See other posts from Stack Overflow or by Eric J.
Published on 2010-06-01T22:25:05Z Indexed on 2010/06/02 13:04 UTC
Read the original article Hit count: 474

I worked on a fairly large project a while back where we modeled the classes in Enterprise Architect and generated the (partial) POCO classes (complete with model-driven business rule validations), persistence (NHibernate mapping file) and DDL. Based on certain model attributes we could flag alternate generation strategies or indicate that a particular portion would be entirely hand-coded.

There was a good deal of initial investment, but it paid large dividends over the lifetime of a 15 developer, 3 year project.

I'm investigating doing something similar with the current Microsoft technology stack. The place I'm stuck is that class modeling is done with the VS 2010 UML tools, but logical data modeling is done with Entity Data Modeler.

Is it a reasonable path to use VS 2010 UML as the "single source of truth" and code generate the edmx files based on the class model? That's the inverse of the common path to create the entity model and use a POCO generator to generate classes. However, a good class model can be used to generate much more than just the properties so I tend to view it as a better choice than the entity model.

© Stack Overflow or respective owner

Related posts about visual-studio-2010

Related posts about uml