我刚刚下载了
LinqPad,以探索在我正在处理的应用程序中使用Linq查询的好处,但是当我在左侧列中查看我的数据库表时,LinqPad会在最后显示所有带有’s’的表,实例CategoryTbl变为CategoryTbls但是当我在SQL管理工作室中查看我的数据库时,表名显示正确.
虽然任何表都应该有一个S,即客户端保持不变.
当我执行Linq查询时,我必须对CategoryTbls执行它,但必须对CategoryTbl执行SQL查询.
我只是想知道为什么会发生这种情况,这是一个错误还是一个功能?如果它是一个功能为什么?
谢谢
解决方法
来自
LINQPad FAQ的第一个问题:
Why does LINQPad pluralize table and child association properties? Can I switch this off?
Pluralizing child association properties (while keeping parent associations singular) makes for the most natural queries and is what Visual Studio does by default in building typed DataContexts.
To switch off pluralization,uncheck the “Pluralize” option when adding the database connection. (If the connection has already been created,right-click it to edit the connection properties).
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。