我有这个 LinQ 查询:
Customers.Select (c => new {
Customer_id = c.Customer_id,
Customer_name = c.Customer_name,
Customer_Campaign = 5,
Customer_Type = "Good!",
})
为什么 SQL 窗口中显示的 SQL Translation 是:
SELECT [t0].[Customer_id] AS [Customer_id], [t0].[Customer_name] AS [Customer_name]
FROM [Customers] AS [t0]
...完全无视我的常数!
我认为 LinqPad 是有史以来最好的工具,我每天都使用它,但我还需要做一些 SQL 翻译,这让我大吃一惊!