Model reverse engineering

Topics: Service Factory Modeling Edition Forum
Nov 26, 2007 at 5:30 PM
i apologize in advance if this has been answered in a previous post.

since it isn't possible to create data contracts from business entities, i tried just copying my business entities into my DataContracts project, which worked fine. is there a way to import or reverse engineer those class files into the data model? i can't seem to reference the data contracts from the service contract model unless they are specified in the data contract model.

it would be nice if the model could be updated by manually generated classes.

Nov 26, 2007 at 6:07 PM
As you realized, reverse engineering is not supported (only one way generation) so you will need to create your contract starting from the model.
On the other hand, you may consider not exposing your business entities in your contract (DataContact classes).
Perhaps you can think of your DCs as a way to expose your service requirements in terms of messages rather than simple use your BEs that are specific to your business and may not be shared across boundaries.
Nov 26, 2007 at 6:28 PM
thanks charly,

i am certainly interested in exposing the data contracts as service requirements.

the service i am creating is primarily for database interaction. so i created the entities and crud procedures using the repository factory. since this service will primarily be data centric, it would've been nice to generate the data contracts as a starting point in the model, since the DC's and BE's will be closely related at first.

i was trying to avoid having to basically type the "database model" all over again in the data contract model of the service.

thanks again.