Database Reference
In-Depth Information
Figure 7-3. Employees and Tasks tables in our database
Notice that the tables in Figure 7-3 take the plural form. This is common in many databases. Some DBAs believe
that all table names should be plural; other DBAs believe just the opposite. Of course, there are a few that don't
seem to follow any particular view and mix things up. Depending on your perspective, you may want to use the
singular form of the table names for your model's entities. Entity Framework provides a Pluralization Service that can
automatically generate the singular form of a table name to use as the corresponding entity name.
To use the Pluralization Service when importing your tables, check the Pluralize or singularize generated object
names box in the last step of the Entity Data Model Wizard (see Figure 7-4 ). By default, this box is checked.
Figure 7-4. Enabling the Pluralization Service
Figure 7-5 shows a model created when we import the table in Figure 7-3 without the Pluralization Service enabled.
Notice that entity names are taken directly from the table names and retain the plural form. Figure 7-6 shows the same
tables imported with the Pluralization Service enabled. These entities use the singular forms of the table names.
Search WWH ::




Custom Search