LinqPad在每个表的末尾添加了一个S.

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

相关文章

SELECT a.*,b.dp_name,c.pa_name,fm_name=(CASE WHEN a.fm_n...
if not exists(select name from syscolumns where name=&am...
select a.*,pano=a.pa_no,b.pa_name,f.dp_name,e.fw_state_n...
要在 SQL Server 2019 中设置定时自动重启,可以使用 Window...
您收到的错误消息表明数据库 'EastRiver' 的...
首先我需要查询出需要使用SQL Server Profiler跟踪的数据库标...