8.10. Pluralization

Pluralization is a new feature in EF4 that generates more readable entity names. In EF1, if you had a table called Film, then your entities would be called Film, and entity sets of Film would also be called Film, which made querying not as readable as it could have been. Thus, many developers would manually rename entity sets of Film to be called Films, which could be pretty boring.

In EF4, if you select to use the pluralization option when creating the model, then Film's entity set will be automatically named Films.

Note that the new pluralization feature doesn't just stick an -s on the end of the table name. It is cleverer than that; for example, it knows when to append or remove -s, or when to modify the ending of a word ...

Get Introducing .NET 4.0: with Visual Studio 2010 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.