Is there a way to set custom pluralizations in EDM designer 2010?

。_饼干妹妹 提交于 2019-12-30 10:58:10

问题


I am using VS 2010 and I have an entity 'Person'.

The pluralization-service turns its plural to 'People', I want it to be Persons. Is there a place where I can manage the pluralizations library?


回答1:


Not in Visual Studio, no.

In the meantime though you can drop down to the API level and create your own implementation derived from the abstract PluralizationService class. Once you’ve done this you can tell the EntityModelSchemaGenerator to use your implementation, rather than the default, to produce a model using your particular pluralization rules. This is an API only solution, we don’t yet provide a way to choose a different pluralizer in Visual Studio.

You can use the pluralization service in your own code, however, and customize it there.

Here's an example.



来源:https://stackoverflow.com/questions/2696825/is-there-a-way-to-set-custom-pluralizations-in-edm-designer-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!