I am fetching the products list whose name starts with numbers, but i would like to apply the two more filters like with specific BranchId and isActive.
Query which returns the list of products whose name starts with numbers.
List<string> searchP = new List<string> { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0" };
.....Where(x=> searchP.Any(y=> x.ProductName.StartsWith(x.ProductName))).ToList();
I have a list of filters in custom FilterCollection
object named filters
which has three properties, filtername
, operatorname
and filtervalue
.
filters.Add(FilterKey.BranchId, Filteroperator.Equals, 333);
same for isActive
, this is what I have passed before one layer back.
I would like to get the products whose name starts with number and having BranchId==value
in filter and isActive==filter value
i.e true
/ false
.