如何使用具有非复数表名称的 SubSonic SimpleRepository
我发现 SubSonic SimpleRepository 需要复数表名,但是我已经开始处理没有这个的数据库,并且我无法更改表名。
有没有一种方法可以在不更改数据库的情况下使用 Subsonic?
我看过一个建议,但我没有太想像了。
我并不局限于使用 SimpleRepository,我只是认为它是最简单的,因为我需要能够根据客户的要求交换数据库连接(SQL 和 Oracle)。两者的架构相同。使用 SimpleRepository,我只需更换 web.config 中的连接字符串即可。
I have found out that SubSonic SimpleRepository expectes plural table names however I have started working on a database that doesn't have this and I am unable to change the table names.
Is there a way I can use Subsonic without making database changes?
I have seen one suggestion but I don't fancy that too much.
I'm not tied to using the SimpleRepository I just thought it would be easiest as I need the ability to swap database connections (SQL & Oracle) based on the clients requirements. The schema is the same on both. With SimpleRepository I can just swap out the connection string in the web.config.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在与 Simple Repo 一起使用的类上应用 SubSonicTableNameOverride 属性,并使用任意表名称!
You can apply the SubSonicTableNameOverride attribute on your classes you use with Simple Repo and use an arbitrary table name!