Monthly Archives: January 2011

Entity Framework 4 (EF4) with Visual Studio 2010 and Pluralisation

With the recent release of Microsoft’s EF4 with Visual Studio there is some debate around the use of pluralisation of table names.

Standard database theory is taught to use singular entity names, i.e. Genre and the table names should match this singular naming convention, i.e. Genre not Genres.

With EF4, whether using the Code First (CF) features or not, the table names are expected to be pluralised. This is an issue if you prefer to stick with the singularised table names or don’t have a choice on pre-existing databases. It is difficult to change an existing database, especially if that database is being used by other programs or reports within an organisation. This also causes some conflicts when an entity such as Person is used – the EF pluralises this as Persons but perhaps People would be a better option.

This post shows how to get around the EF pluralisation for whatever reason you need. Continue reading

Posted in Code, Development | Tagged , , , , , | Leave a comment