Linq like or other construction

Posted by Yauhen Kavalenka on Stack Overflow See other posts from Stack Overflow or by Yauhen Kavalenka
Published on 2012-11-23T10:48:34Z Indexed on 2012/11/23 10:59 UTC
Read the original article Hit count: 265

Filed under:
|
|
|
|

I have DB oracle in my solution. I want to have some results in this query. Query example:

select * from doctor where doctor.name like '%IVANOV_A%';

But if i do it at LINQ i cannot get any result.

from p in repository.Doctor.Where(x => x.Name.ToLower().Containsname))
select p;

Where 'name' is variable of string parameter.

Web layout request next string: "Ivanov a" or "A Ivanov"

But i suggest for user choose you pattetn for query.

How i can to get "patient by name" if name consist of "First name" and "Last name" but user doesn't know your doctor's full name?

© Stack Overflow or respective owner

Related posts about c#

Related posts about sql