Edit

Share via


Turn pluralization on and off (O/R Designer)

By default, when you drag database objects that have names ending in "s" or "ies" from Server Explorer or Database Explorer onto the LINQ to SQL tools in Visual Studio, the names of the generated entity classes are changed from plural to singular. This is done to more accurately represent the fact that the instantiated entity class maps to a single record of data. For example, adding a Customers table to the O/R Designer results in an entity class named Customer because the class holds data for only a single customer.

Note

Pluralization is on by default only in the English-language version of Visual Studio.

Note

The instructions in this article illustrate the most recent version of the interactive development experience (IDE) available in Visual Studio. Your computer might show different names or locations for some of the user interface elements. You might be using a different version of Visual Studio or different environment settings. For more information, see Personalize the IDE.

Prerequisites

  • Visual Studio with the LINQ to SQL tools. To install the tools, start the Visual Studio installer, and select Modify. On the Individual Components tab, search for and select LINQ to SQL tools under the Code tools category. Select Modify to update your installation.

Toggle the pluralization setting

Follow these steps to turn the pluralization setting on and off:

  1. Open the Options pane by selecting Tools > Options.

  2. In the Options pane, expand All Settings > Database Tools.

  3. In the right pane, select O/R Designer. The Options dialog opens.

  4. In the Options dialog, configure pluralization for the O/R Designer:

    • To apply pluralization rules so class names are changed, set the Pluralization of names setting value Enabled = True.
    • If you don't want to apply pluralization rules, set the Pluralization of names setting value Enabled = False.
  5. Select OK.

  1. On the Tools menu, select Options.

  2. In the Options dialog box, expand Database Tools.

    Note

    Select Show all settings if the Database Tools node isn't visible.

  3. Select O/R Designer.

  4. Set Pluralization of names to Enabled = False to set the O/R Designer so that it doesn't change class names.

  5. Set Pluralization of names to Enabled = True to apply pluralization rules to the class names of objects added to the O/R Designer.