Page 1 of 1

Keep the underscore in table column names in the class?

Posted: Mon 24 Jan 2011 16:19
by nimli
I'm running a test with Linq.
When the Entity Developer generates the C Sharp codes, I notice the under score (_) of the table column names are removed. For example, in the database, if I have:

CREATE TABLE table1 (
col_1_a VARCHAR;
);

the generated C Sharp code will become:

table1.col1a

Is there any way I can keep the underscore of the column name in the C Sharp codes?

Thank you.

Posted: Tue 25 Jan 2011 18:14
by StanislavK
This behaviour is defined at the 'Setup naming rule' step of the Create Model wizard. In particular, to keep underscores in the entity and property names, please disable the 'Remove underscore' check boxes.

Posted: Tue 25 Jan 2011 18:30
by nimli
Yes, this solves my problem.
I somehow missed the checkbox in my previous test.
Many thanks!