views:

51

answers:

2

Hello

I was noticing that the designer for the edmx is giving the entities and classes strange names, all in plural etc, what should be the correct naming for it?

like it is now is like:

Customers (entity) CustomersSet (setname) Cusomters (navigation property)

shall it be:

Customer (entity) Customers (setname) Customer (navigation property)

?

TIA

/M

+1  A: 

I would tend to agree on the two first present in the list. the last one may be a set or a single entity.

Customer (entity) Customers (setname) Customer (navigation property)

Alexandre Brisebois
+3  A: 

If the designer is giving your entities plural names, that means that your database has plural table names. That's fine. Entity Framework version 4 will pluralize things automatically, but for now you need to fix this up yourself.

What I do is:

  • Entity type names are always singular
  • Entity set names are always plural
  • Navigation property names are either singular or plural, depending upon the cardinality of the relationship. So a one to one property would be singular, and a one to many property would be plural.
Craig Stuntz