Click here to Skip to main content
14,241,831 members
Rate this:
Please Sign up or sign in to vote.
See more:
I'm started learning LINQ and I think that is great but i have one problem.

How I can use % in writing linq queries, in SQL i could „SELECT * FROM CUSTOMERS WHERE FIRST_NAME LIKE 'AL%'“. How I can that SQL query translate in LINQ.

Thanks!
Posted
Rate this:
Please Sign up or sign in to vote.

Solution 1

you could say item.FirstName.StartsWith("AL")
   
Comments
bbirajdar 13-Aug-12 6:37am
   
Exactly..........
Rate this:
Please Sign up or sign in to vote.

Solution 2

here i am posting some thing about Linq basic operation select, insert, delete, update.

http://suhasharidas.blogspot.in/2012/08/create-linq-to-sql-connection-with.html[^]
   
Comments
bbirajdar 13-Aug-12 6:38am
   
No spamming please.. This is too old question to answer and the OP has already marked it solved. Morever the answer is repost and not a answer at all. Do care to read the question before posting

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100