Will Strohl
Will Strohl

Reputation: 1680

SubSonic v2.2 with SubCommander Not Stripping Table Text

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?

Upvotes: 1

Views: 370

Answers (2)

runxc1 Bret Ferrier
runxc1 Bret Ferrier

Reputation: 8233

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.

Upvotes: 2

dcharles
dcharles

Reputation: 4852

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.

Upvotes: 0

Related Questions