Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using a linq query like this

SQL
var ResultNSF = from Data in lstRecData      //CSY  contact vibration specialist for grid
                                 where Data.strRecPriority.Contains("2"||"3") && Data.strRecDesc == "Contact Vibration Specialist"
                                 select Data;



but i want to use OR in Data.strRecPriority.Contains("2" || "3") but i am unable to do this.
Posted

1 solution

You can split that or condition
Example
var ResultNSF = from Data in lstRecData//CSY  contact vibration specialist for grid
     where (Data.strRecPriority.Contains("2") || Data.strRecPriority.Contains("3"))
      && Data.strRecDesc == "Contact Vibration Specialist"
     select Data;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900