Like in Lambda Expression and LINQ

后端 未结 6 1610
伪装坚强ぢ
伪装坚强ぢ 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条回答
  •  不思量自难忘°
    2020-12-08 10:36

    Use Regex.IsMatch in your where statement or for a more simpler version without wildcards etc.:

    customers.where(c=>c.Name.Contains("john"));
    

提交回复
热议问题