有没有办法在EDM Designer 2010中设置自定义复数? [英] Is there a way to set custom pluralizations in EDM designer 2010?

查看:91
本文介绍了有没有办法在EDM Designer 2010中设置自定义复数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS 2010,我有一个实体人。

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?

推荐答案

不在Visual Studio中,没有。


同时,您可以下降到API级别并创建派生自抽象PluralizationService类的实现。完成此操作后,您可以告诉EntityModelSchemaGenerator使用您的实现(而不是默认设置)来使用您的特定复数规则生成模型。这是仅API的解决方案,我们还没有提供在Visual Studio中选择其他复数器的方法。

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.

这是一个示例

这篇关于有没有办法在EDM Designer 2010中设置自定义复数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆