Like in Lambda Expression and LINQ

后端 未结 6 1627
伪装坚强ぢ
伪装坚强ぢ 2020-12-08 09:45

How can I do something like this:

customers.where(c=>c.Name **like** \"john\");

I know this isn\'t possible but I was wondering how can

6条回答
  •  猫巷女王i
    2020-12-08 10:32

    Here is my code :

    string s="somethings";
    
    customers.Where(c => c.Name != null && c.Name.ToLower().Contains(s.ToLower()));
    

    Somethings like that.

提交回复
热议问题