About

SubSonic is a .net open source project developed by Rob Conery and a core team of developers including Eric Kemp, Scott Watermasysk, Jon Galloway, Phil Haack, and Gavin Joyce. The current stable release is version 2.0.3. Nightly builds are available in our SVN respository.

Tags

Entries categorized 'Configuration' ↓

Defining Which Tables And Views You Want To Generate Code For

Many times you don't want to generate code for particular tables or views in your database (the aspnet_* tables, for instance), or you don't want the table's name to carry through as it is. We've tried to make this easy for you to deal with by use of Regex and naming rules that you can set on the Provider. includeTableList and excludeTableList You can set these flags on the Provider, and they will determine which tables get generated for you. They use Regex for matching so you can even specify wildcards. If we're using Northwind and I only want to generate objects for Product and Category, I can...

How To Deal With Naming Collisions

Hello, Regex Via three parameters on the provider, you can use Regular Expression to transform the naming of Tables, Views, Properties, and Stored Procedures without impacting the underlying data access or database naming. The configuration parameters are: regexMatchExpression (string) regexReplaceExpression (string) regexIgnoreCase (bool, default is false) The setting of these values are pumped through the following method at code generation time: public static string RegexTransform ( string inputText , string matchString , string replaceString , bool caseSensitive ) { Regex rx ; if ( caseSensitive...

Config Options

Global Settings defaultProvider value: string default: [Empty] When using multiple providers, this setting indicates which provider should be referenced when a provider name is not specified templateDirectory value: string default: [Empty] The absolute physical path to the SubSonic templates. This value is optional, and is only necessary if you are making changes to the default templates and wish to override the internal definitions. By default, the templates are located in the \SubSonic\CodeGeneration\Templates. Provider Level Settings generatedNamespace value: string default: 'SubSonic.Generated...

Subscribe