|Originally posted by fcazabon|
I get an error:
'Email' is an invalid EntityType name because member names cannot be the same as that of the enclosing type
I imagine this is because I have a table in my database called Emails with a field called Email. How do I work around this without changing the underlying field name?
It's an Entity Framework restriction that the name of a property can't be the same as the name of its containing entity. The problem is occurring because the pluralizer is attempt to make the entity name singular, which causes it to conflict with the property name.
You can work around this by renaming the property (or the entity) before running the pluralizer, so that the entity name, when singularized, doesn't conflict with the property name.