In my case the Filter is an int value. I want the user to be able to enter the values like this (1,2,3,4,5,..). I applied this query with an string value and it working just fine
if (Country != null)
{
String[] Country_Array = Country.Split(new Char[] { ',' });
query = from p in query where Country_Array.Contains(p.Hotel_Country) select p;
}
Now I tried to do the same query to an Int filter but its not working:
if (Hotel_Number != null)
{
String [] Hotel_Array = (Hotel_Number.ToString().Split(new Char[] { ',' })) ;
query = from p in query where Hotel_Array.Contains(p.Customer_No_) select p;
//Hotel_Array.Contains(p.Costomer_No_) select p;
}
I get an Error at the p.cutomer_no
! I also tried to convert it to:
p.Customernumber.toString().toArrayChar()
But its also not working.
any idea how to solve it ?