Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling automatic pluralization in Linq to SQL Classes for a single class only

I have a single table name with an irregular plural (the plural is the same as the singular). Is there any way to disable the automatic pluralization (Account = DB.Accounts) for that single table while retaining the feature for the others?

like image 224
Thomas Bonini Avatar asked Aug 30 '11 14:08

Thomas Bonini


Video Answer


1 Answers

You need to disable the Pluralize Table Names for the LINQ to SQL designer.

To do this navigate to Tools -> Options -> Database Tools -> O/R Designer and change the Pluralization of names to false.

Then you will need to recompile your project and it should address the naming

Linq to SQL: How do I stop the auto generated object name from being renamed?

like image 190
Sergey Volosevich Avatar answered Oct 13 '22 01:10

Sergey Volosevich