Extending WCF with Custom Behaviors

Topics: Service Factory Modeling Edition Forum
May 14, 2008 at 3:19 PM
Using the Feb 08 release for VS2008 I tried to add a custom behavior that would cache the database results service side based on the MSDN December 2007 Service Station article.  I was unable to find a place to put my custom behavior attribute into the service contract model.  I know I can manually go in and add the attribute on top of the operation contract attribute, yet would have to remember to do that each time the code was regenerated.  Any suggestions?

MSDN Dec 2007 Service Station code


Thanks in advance!
Jason
Developer
May 15, 2008 at 12:18 AM
Jason,

You can open the 'Service Contract DSL\Dsl\TextTemplates\WCF\CS\ServiceContract.tt' file and add your custom attribute in that text template file so every time you generate code your attribute will be automatically added.