How to do a “where in values” in LINQ-to-Entities 3.5

前端 未结 7 1361
时光说笑
时光说笑 2020-12-15 18:42

Does anybody know how to apply a \"where in values\" type condition using LINQ-to-Entities? I\'ve tried the following but it doesn\'t work:

var values = new         


        
7条回答
  •  无人及你
    2020-12-15 19:24

    Yes it does translate to SQL, it generates a standard IN statement like this:

    SELECT [t0].[col1]
    FROM [table] [t0]
    WHERE [col1] IN ( 'Value 1', 'Value 2')
    

提交回复
热议问题