How to use Dynamic LINQ (System.Linq.Dynamic) for LIKE operation?

前端 未结 5 1741
萌比男神i
萌比男神i 2021-02-04 07:31

Can any body tell me how can I use a LIKE operator using System.Linq.Dynamic?

I need to add more than one LIKE expression in my dynamic where query

5条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-04 08:23

    You can use .StartsWith(), .EndsWith() and .Contains() which will generate LIKE SQL with trailing, leading and surrounding wildcards respectively. Don't know of a way to generate a statement with an embedded wildcard tho.

提交回复
热议问题