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%' ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top