Can You Generate Data Model Against Database Tables?

Topics: Service Factory Modeling Edition Forum
Aug 31, 2010 at 2:36 PM

I am wondering if anybody successful in generating model from existing tables in database. I already have a huge database and now I need to expose the business layer in to service layer. I have generated the select, insert, update, and delete methods from database schema and want the same for data model. It’s no feasible to do this all manually. I have seen the xml in .datacontract file but each column is assigned a GUID not sure if I can assign my own GUID.

I simply trying to generate this .contract file by reading database schema and the I want to use .contract file to generate data contract classes. I believe it’s a common need the most of people are willing to solve and if any one solved please share it here.

Thanks,

Developer
Aug 31, 2010 at 4:18 PM

HI,

Here you have the docuemntation about the .dsl format (http://msdn.microsoft.com/en-us/library/bb126610(VS.80).aspx) and you can also geenrate this file and use the included schema file to validate it. (Look for the schema file in each deploy folder like: Web Service Software Factory 2010 DC Model\4.0.0.0\GeneratedCode\DataContractSchema.xsd).

On the other hand, you can use the modeling API defined in each DSL project and follow the path of the Import WSDL contrib project (source code included) but instead of generating teh Service Contract from a WSDL, you can also generate the Data Contract model and then the user may save it to the .dsl file. More on Import WSDL here: http://wssfcontrib.codeplex.com/releases/view/46069

Regards,

Hernan