我刚刚下载了
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 Stu@R_403_410@ 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).