Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C# by Arye ( 14 years ago )
//טקסט חופשי
var words = freetext.Split(' ').Where(s2=>!string.IsNullOrWhiteSpace(s2));
if (words.Count() > 0)
{
var oFreeTextPredicate = PredicateBuilder.True<Yad2>();
foreach (var word in words)
{
var predicate = PredicateBuilder.False<Yad2>();
predicate = predicate.Or(f => f.comments.Contains(word));
predicate = predicate.Or(f => f.product.Contains(word));
predicate = predicate.Or(f => f.manu.Contains(word));
oFreeTextPredicate = oFreeTextPredicate.And(predicate);
}
q = q.Where(oFreeTextPredicate);
}
Revise this Paste