我在实体 sql 中使用以下查询
Select n.Name as NodeNameN from Nodes as n where n.Name IN MultiSet (@Test)
该值在运行时使用以下代码替换:
var reader = model.CreateQuery<System.Data.Common.DbDataRecord>(
Statement,
Parameters.ToArray());
执行时,sql server中生成的相应语句如下:
exec sp_executesql N'SELECT
1 AS [C1],
[Extent1].[Name] AS [Name]
FROM [dbo].[Nodes] AS [Extent1]
WHERE [Extent1].[Name] = @Test',N'@Test nvarchar(4000)',@Test=N'''BMA'',''Area A'','
代替IN
子句的=
子句被替换。
我在这里做错什么了吗?