home recent topics recent posts search faq  

Huagati Systems Support Forum



register | lost password   open id sign in with Twitter
Messages in this topic - RSS

Home » Huagati DBML/EDMX Tools Support » Column named 'Module generates property 'Module1'

Support forum for Huagati DBML/EDMX Tools
4/16/2011 11:34:24 PM

laurentricci
laurentricci
Posts: 2
Hi,

When my Linq-to-SQL dbml model from the database, the default behaviour is:
a column called 'Date' is generating a 'Date1' entity property, and
a column called 'Module' is generating a 'Module1' entity property,

I would like to keep my entity properties with the same name as my table columns.

Is it a known issue, is it linked somehow to unallowed reserved words ?

Many thanks

Regards, laurent
0 permalink
4/18/2011 6:02:00 AM

Kristofer Andersson
Kristofer Andersson
Moderator
Posts: 312
Hi,

If you open the [modelfile].namePrefs file there are two settings controlling if reserved keywords are allowed as entityset, entitytype, member property, and stored procedure/function method names. AllowCSKeywords controls if C# keywords are allowed, AllowVBKeywords controls if VB keywords are allowed.

The default value for these settings is false, and that is why it changes Module to Module1 etc. If you change one or both to true under each section, it will not change the names automatically if it encounters a reserved keyword.


<AllowCSKeywords>false</AllowCSKeywords>
<AllowVBKeywords>false</AllowVBKeywords>



Best regards,
Kristofer
0 permalink
4/19/2011 12:29:48 AM

laurentricci
laurentricci
Posts: 2
Hi Kristofer,

Thanks for your quick answer.

I have set <AllowCSKeywords>true</AllowCSKeywords> for the PropertyPrefs section, but unfortunately the table is still getting generated with a column called Module1, when the database column is called Module.

I have even set AllowCSKeywords to true in each of the four sections, restarted Visual Studio but no change.

Even if I delete the table from the dbml model, it is regenerated from scratch with a column called Module1.

For your information, I am using VS2005 with Huagati DBML/EDMX Version 2.23.4085.33125

Am I missing something ?

Kind Regards
Larent
0 permalink

Home » Huagati DBML/EDMX Tools Support » Column named 'Module generates property 'Module1'





Powered by Jitbit Forum 7.1.0.0 © 2006-2011 Jitbit Software