Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
1.20/5 (2 votes)
See more:
In tutorial i found example

C#
where c.sUserName.Contains(param)
                       orderby c.nStartDate descending

How use two LIKE operator with OR?
Posted
Comments
CHill60 17-Apr-13 8:30am    
I'm struggling to understand your question. You may also like to consider using the Improve question link to add LINQ to your tags
[no name] 17-Apr-13 8:41am    
SQL: WHERE title LIKE '%W%' OR title_b LIKE '%w%'
How this write on Entity LINQ
AmitGajjar 17-Apr-13 8:54am    
if you only need to compare with lower and upper case then you can use ToLower or ToUpper before using Contains.
Member 10127362 3-Dec-13 9:15am    
Where title.Contains(W) or title_b.Contains(w)

Hi,

Try with below query that may work for you.
C#
where c.sUserName.Contains(param1) || c.sUserName.Contains(param2)
                       orderby c.nStartDate descending


Thanks
-Amit
 
Share this answer
 
Comments
[no name] 17-Apr-13 11:41am    
Thank you it works
AmitGajjar 18-Apr-13 0:57am    
your welcome.
Check this sample application:

Entity Framework for Beginners[^]
 
Share this answer
 
v2

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