Compiled Linq & String.Contains

后端 未结 2 848
暗喜
暗喜 2021-01-20 19:05

I\'m using Linq-to-SQL and I use compiled Linq for better performance.

I have users table with a INT field called \"LookingFor\" that can have the follo

2条回答
  •  死守一世寂寞
    2021-01-20 19:32

    I'm facing the same problem. I have managed for now just one workaround for this problem. Instead of using

    u.LookingFor.ToString().Contains(lookingFor)
    

    I've used

    u.LookingFor.ToString().IndexOf(lookingFor) >= 0
    

提交回复
热议问题