LINQ To SQL exception: Local sequence cannot be used in LINQ to SQL implementation of query operators except the Contains operator

后端 未结 4 904
一向
一向 2020-11-30 11:05

Consider this LINQ To SQL query. It\'s intention is to take a string[] of search terms and apply the terms to a bunch of different fields on the SQL table:

s         


        
4条回答
  •  我在风中等你
    2020-11-30 11:43

    Essentially, the error is saying that you are doing a join between two collections, one of which is a database table, and the other is an array. LINQ isn't designed to handle that -- either both need to be in the database, or both in-memory (with a special case exception made when using Contains)

提交回复
热议问题