Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the hueman domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/CloudIngenium.com/htdocs/wp-includes/functions.php on line 6114
Entity Framework 4: Any way to know the plural form of an Entity Type? – Knowledge eXchange

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.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.