0
maharatha created
I am trying to use th epredicate builder : <a class="postlink" href="http://www.albahari.com/nutshell/predicatebuilder.aspx">http://www.albahari.com/nutshell/predicatebuilder.aspx</a>
How can I use with Abp ?
3 Answer(s)
-
0
Hi,
You can use it like in it's examples. Did you have any problems while using it ?
-
0
var predicate = PredicateBuilder.New<_masterFileAttributeRepository>(); if (!string.IsNullOrWhiteSpace(input.StringValue1)) { predicate = predicate.And(x => x.StringValue1.Contains(input.StringValue1)); } if (!string.IsNullOrWhiteSpace(input.StringValue2)) { predicate = predicate.And(x => x.StringValue2.Contains(input.StringValue2)); }
I am trying like this but x.StringValue1 is throwing error.
Am I doing anything wrong ?
-
0
Hi,
I haven't tried .New function but maybe you need to give your entity for that ? If it does not work, can you try it like this.
var predicate = PredicateBuilder.True <Product> ();