开发者

Pluralize English words Like LINQ to SQL Does [duplicate]

This question already has answers here: Closed 12 years ago.

Possible Duplicate:

Pluralize - Singularize

The C# 4.0 (maybe older versions, but I've only tested with 4.0) Linq-to-SQL generator will pluralize your table names; even tough plurals like Territory. It knows that Territories is the plural. Is there anyway to access th开发者_开发问答is pluralization function?


System.Data.Entity.Design.PluralizationServices.PluralizationService

EDIT Linking the (older) answer in the (older) question, as eglasias suggests. Go forth and upvote, he deserves the rep.


I'm not sure the Linq to SQL inflector is publicly accessible, but if you need an inflector you could use SubSonic's inflector, NCommon, uNhAddins, Castle ActiveRecord, etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜