locked
T4 Templates and WCF Client generation RRS feed

  • Question

  • Hi I am currently in a project there we are consuming some wcf services, but we are not happy with the generation result of the service proxy.

    We are getting ugly names like service.NameSpace_Are_In_The_Method_NameBeginSomeMethod.....

    And we want the possibility to do some other changes.

    Can we somehow change the template that are generating these service client proxies??

    I have read something about T4 but everything has been about the objects, which we don't have any problems with cause we are reusing them.

    Wednesday, September 15, 2010 11:08 AM

Answers

All replies

  • Why not?
    T4 template are in general very easy to edit and extensible, if you don't like the naming you can simply go change it.

    This is a sample on how to write a T4 template to consume WCF service
    http://geekswithblogs.net/abhijeetp/archive/2009/10/18/t4-template-consuming-a-wcf-service.aspx

    Friday, September 17, 2010 7:46 AM
  • Hi

    Current I am working on approach to create WCF generator using T4 template to achieve following:

    on Click of T4 template, WCF generator,

    • Dynamic generation of class file from Linq to SQL based on Database connection information and database name.
    • Dynamic Generation of WCF Service by including above bulleted class file’s methods and properties.

    Could you please provide few inputs on this.

    Thanks,
    Ravi

    Tuesday, August 7, 2012 11:51 AM