Lambda

  • Thread starter Thread starter Miriam Nogueria
  • Start date Start date
M

Miriam Nogueria

Hi, how i can make a Like ( as TSQL ) in Lambda ?

I was searching but i couldn´t find it.

TIA
 
Miriam Nogueria said:
Hi, how i can make a Like ( as TSQL ) in Lambda ?

I was searching but i couldn´t find it.

You mean a LINQ query, not a Lamda, right?

It's not exactly the same as a Like, but if you write a query like this:

from c in dc.Table where c.Field.StartsWith("abc") ...

then it will be automatically translated into a LIKE when it is sent to
the server:

Select ... from Table Where Field LIKE 'abc%' ...
 
you are right, thanks Alberto.


Alberto Poblacion said:
You mean a LINQ query, not a Lamda, right?

It's not exactly the same as a Like, but if you write a query like this:

from c in dc.Table where c.Field.StartsWith("abc") ...

then it will be automatically translated into a LIKE when it is sent to
the server:

Select ... from Table Where Field LIKE 'abc%' ...
 
Back
Top