Linq to Entities - SQL “IN” clause

前端 未结 8 1263
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 05:10

In T-SQL you could have a query like:

SELECT * FROM Users WHERE User_Rights IN (\"Admin\", \"User\", \"Limited\")

How would you replicate t

8条回答
  •  别那么骄傲
    2020-11-22 06:11

    Seriously? You folks have never used

    where (t.MyTableId == 1 || t.MyTableId == 2 || t.MyTableId == 3)
    

提交回复
热议问题