views:

70

answers:

1

Hi,

Is there a way in Subsonic to append text to a generated class name? I know the appendWith property can be used in cases where the property name conflicts with type names, but is there a way to do it for every table regardless of the name? I've tried using the regular expression match and replace but that also appends the text to the property names.

It's not really a big problem, just curious to know if it can be done.

Thanks

A: 

Hi,

Looks like you'll have to do like I have this morning and modify your templates - have a look in particular at VB_ClassTemplate.aspx or CS_ClassTemplate.aspx depending on your build language.

Find the sections of the page where the functions are built for each table and modify as required. Make a back up of your templates first using the config to point at your own templates.

If you get stuck give me a shout as I've recently been through this (see my first question).

Hope this helps.

CResults
Thanks for that. I made a copy of the templates and pointed the 'TemplateDirectory' parameter to it. It took lots of messing around with two of the files (mostly CS_ClassTemplate.aspx). A bit messy but it worked.I notice that it doesn't rename the files, just the class name. Is there some way of changing the file name too? Couldn't see in the code where it's set