Linq2SQL to produce Like operator
Posted
by Dante
on Stack Overflow
See other posts from Stack Overflow
or by Dante
Published on 2010-04-13T11:32:57Z
Indexed on
2010/04/13
11:42 UTC
Read the original article
Hit count: 405
linq-to-sql
|like-operator
Hi,
I have a string "Word1 Word2" and I want to transform it to a query such as "Like '%Word1%Word2%'".
At the moment I have:
from t in Test
where t.Field.Contains("Word1 Word2")
How to do this in LINQ2SQL? Do I need to create two separate queries for this, can't I write it in the same statement?
Thx in advance
© Stack Overflow or respective owner