Entity Framework 4: Any way to know the plural form of an Entity Type?
While working on a project I came across the need to identify what the entity set name is so I can use that to add an updated entity to the set. In order to identify the plural I came up with two options:
- Use the Pluralization service to figure out the entity set name: The problem with this is that you assume the plural is always the entity set name which is not a guarantee.
- Use the following command: YourEntityObject.EntityKey.EntitySetName
I ended up using the second option as that will always return the Entity set name but it is good to know how to “calculate” the entity set if you need to.
Love
Can we use Let's Encrypt, the free and open certificate authority?
Hola! gracias por la info, me sirvió el comando sacandole el nombre del server. En mi caso, fue una migración…
Yes 3rd option helped me too. I removed the WC key Values from config file then started working.
I know this is from 2014. But really, thank you!