data Name{"divan","dîvan","divân","dîvân" }
我希望在linq中使用select * from data where Name like % d_v_n %
然后预期结果为"divan","dîvan","divân","dîvân"
//this linqkit code
var searchPredicate = PredicateBuilder.False<ViewModelListManuscript>();
searchPredicate = searchPredicate.Or(m => m.TRTitle.ToLower().Contains("d_v_n"));
query = query.AsExpandable().Where(searchPredicate);
空结果
答案 0 :(得分:0)
我想,您可以像这样使用SqlMethods.Like(matchExpression,pattern)
:
var results = from dl in DataList
where SqlMethods.Like(dl.Name,"%d_v_n%")
select dl;