tags:

views:

159

answers:

2

I am using SubSonic version 2.2, but using the SubCommander command line tool, integrated into Visual Studio as an External Tool. I have some tables that are prefixed with 3 alpha-numeric characters, and an underscore. For example, the tables look something like this:

ABC_Table1
ABC_Table2
ABC_Table3
ABC_Table4
ABC_Table5

... and so on ...

I am using the following command line, and the table text is not getting stripped from the file names, or the class/object names.

generate /out DAL\generated /lang vb /spClassName StoredProcs /generatedNamespace Company.Data /fixPluralClassNames false /relatedTableLoadPrefix Get_ /stripTableText OTA_ /templateDirectory "C:\SubSonic\Templates"

Can you tell me why the table text is not being stripped?

A: 

Change the /stripTableText OTA_ piece of your configuration string to /stripTableText "OTA_, ABC_"

The /stripTableText switch accepts a string containing text to strip from table names when creating SubSonic objects. To strip more than one string seperate each with a comma.

Marve
Sorry. I meant to alter the example generate statement to be ABC_ instead of OTA_ for this post. That didn't work though.
The Mighty Will
No problem. I'm glad you found the solution.
Marve
+2  A: 

I use the command line tool integrated into Visual Studio as well. If I were you I would first take the parameters that you are passing to the tool and put them into the .config file as SubSonic can read them from the .config file just as easy as passing them in all individually and it is often easier to edit the .config file. I agree with Marve in thinking that the error is due to the text not being commented correctly. Also what provider are you using.

runxc1 Bret Ferrier
That was it! The command line switch was apparently being ignored, with and without quotes, and with and without a comma. Putting this in the config is what I should have done.
The Mighty Will