views:

30

answers:

2

I'm using Visual Studio 2008

Each time I modify my dbml through the designer some of the table names in the designer.cs file are changed from TableName to TableNames leading to some reference errors in the rest of the project. The names that appear on the dbml are not changed.

Where does this come from ? Is it a setting ?

Edit: It happens to tables I have recently added through the designer and to all the tables that have a foreign key linking theme to these tables.

A: 

Its a feature. you may find this SO posting helpful http://stackoverflow.com/questions/1467614/why-does-linq-to-sql-classes-change-the-name-of-a-table-when-making-a-class

Jonathan Bates
In my case the name is not changed in the dbml but in the designer.cs file where the classes are defined.
DrDro
+1  A: 

It was a setting:

Tools > Options > Database tools > O/R Designer

And then we have a Pluralization of names option that I can set to :

Enabled False

DrDro