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

后端 未结 4 896
一向
一向 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:44

    I was getting the same error, but none of the solutions posted above worked for me.

    What worked for me was to cast db.Custs into a list first, as so:

    List =db.Custs.ToList.Where(...
    

    I have no idea why it worked, but it did.

提交回复
热议问题