Working around LinqToSQls “queries with local collections are not supported” exception

后端 未结 4 1978
你的背包
你的背包 2020-12-05 09:32

So, I\'m trying to return a collection of People whose ID is contained within a locally created collection of ids ( IQueryable)

When I specify \"locally created col

4条回答
  •  一个人的身影
    2020-12-05 10:20

    I was struggling with this problem also. Solved my problem with using Any() instead

    people.Where(x => ids.Any(id => id == x.ID))
    

提交回复
热议问题