Subsonic 3 SimpleRepository NON Plural Table names?

大城市里の小女人 提交于 2019-12-02 03:09:09

Nope, it is hardcoded in the SubSonic's source. You can pull it down and trace the migration steps to see where the plural happens. I know, cause I wanted the same thing.

I was tinkering with modifying the source to make plurals optional via some parameter/config override or alike. But, I didn't get it completed (yet).

If your tables already exist then this is not the intended use of the Simple Repository model. The simple repository model is designed to generate the table structures for you using migrations.

If you are using a database that already exists then you would be better served using the T4 Templates as they also support the relationships between your tables.

Cheers,

Ed

With Subsonic 3.0.0.4 in the settings.ttinclude I removed the line;

AddSingularRule("s$", String.Empty);

which was down about 260 lines in the Inflector rules class. Didn't need to mess around with the subsonic source code.

HTH

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