Automatically Generate Data Contracts and Services

Topics: General Discussion Forum
Aug 7, 2010 at 4:51 AM

It's August of 2010 and I haven't seen anything current on the Service Factory.  This product to me is pretty freakin' sweet.  The company I work for recently became interested in developing WCF services for Silverlight Apps to consume.  Our current technology in ASP.NET is built off the CSLA Framework.  I know that technically Business Objects should be decoupled from Data Contracts, but we'd like to base them off the business objects to begin with.  Is there a way I can take either my CSLA business objects or the Entity Framework objects and automatically populate the datacontract diagram / model and servicecontract diagram / model with them?  Is there some way I can make a t4 template or recipe to generate the xml for the diagram, which will in turn generate the data contracts / services?  Also, I've seen from some other posts that you may be looking into returning data contracts instead of messages.  I understand about the benefits of using messages vs data contracts, but the ability to do both would be awesome.

Aug 14, 2010 at 9:53 PM


Thanks for your feedback and interest in the Service Factory. We recently uploaded a beta refresh version (Downloads tab). Regarding the modeling import, the factory does not offer that feature out of the box. It might be possible to do that with the extensibility mechanism that have the factory or you can also try the WSDL Importer extension that take an existing WSDL (url or file) and creates the SC along with all your schema types (but not the DC model).

On the other hand, the idea of expose DC from the Service Contract may be great for some scenarios but that was out of our desging trade offs. However you can also try some tt updates to add that functionality (Check for the hands on labs).