Question

I have in my mobile Service a table called AccountData. I want to include a simple search for Persons. Currently I have this:

return await _personTable.Where(Person => Person.Name == searchstring || Person.Email == searchstring).ToListAsync();

I want to go a step further, so it is not necessary to enter the exact same name...

Was it helpful?

Solution

As har07 wrote:

have you tried using .Contains() function : .Where(Person => Person.Name.Contains(searchstring))

It works!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top