guyS's WebLog

IShare, My DotNet Fingerprint

Annoying - Whidbey strong typed dataset Table/fields/properties names generator

[CORRECTION:

The fields actually expose as properties using the DB Table original name/s but the internal strong typed table Type is as I specified.

The point is, it would be nice if we could configure the naming convention we would like to use and expose and the generator will follow it. Another thing that can help if an option to catch the generator OnPropertyCreate event and add our custom code  ]

When I used to work with Oracle DBs we use for our tables / fields / SPs the underscore to separate between words.

In Oracle we also use prefixes for table names to imply on the instance name. 
We add the table prefixes in order to differ the tables especially when using tools like TOAD that enable us to see
 more then one instance tables according the developer permissions. Actually this is usefull also in SQL Server.
 
We use the underscore because we use tools in Oracle that force lower case on any field name in the instance
 table/s and something like CustomerName will become customername which is hard to read.
 
These kind of "problems" with the names does not exists when working with SQL Server/client.
 
After my experience with Oracle I adopted the naming convention which use the underscore to seperate words.
 
When converting my tables that using the underscore convention to strong typed dataset by using Whidbey designer I got annoying results. 
 
Table name Look like
EMPLOYEE_PHONETable
 
Fields Look like:
HOME_PHONEColumn
OFFICE_PHONEColumn
 
I hope there is a way to configure and force the field names to be -
HomePhoneColumn and so on even though the original field name is HOME_PHONEColumn.
 
If such an option does not exists - I will be happy to see it in future version.
It will also be nice if we could subscribe to the strong typed dataset generation process events and be able to add our
code templates. Events like OnCreateColumnProperty where we can add our stuff could be helpful.
 
Does anyone notice this issue and feel the same like me about it?
Posted: Jan 17 2005, 04:19 PM by guyS | with no comments
Filed under:

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required)