I’m using CodeFirst of EF with a well defined Database.
My Database has a table named ‘Centros’ (Portuguese word) and I manage to find that EF tries to pluralize my entities to get a ‘Centroes’ witch is wrong in this case.
If I remove the pluralization modelBuilder.Conventions.Remove<PluralizingTableNameConvention>(); i manage to get it to work BUT I have to rename my table to ‘Centro’ (to match my entity name).
In Portuguese ‘Centro’ is singular, ‘Centros’ is plural.
I don’t want to rename my table names so how can I specify the matching table name for my entity after a remove the pluralization convention?
I annotate all my classes, regardless of whether the framework can do it for me through some smart reflection routines. E.g.
We can touch type, it’s cleaner and it’s less likely to fall over in some unexpected event.