Is it possible to step into a linq query? I have a linq to entity framework 4 query in it's simplest form:
List = List.Where(f => f.Value.ToString().ToLowerInvariant().Contains(filter.ToLowerInvariant()));
It's a query against an Entity Framework DbContext
and I'm having trouble seeing why it works for something like:
List searching for 001
yields no results against the following list
However any other search yields results (Such as t00
or Test
)
Basically I'm looking for why a query such as the above wouldn't return a result when I'm using a contains and the value matches the end of a string vs just the middle or begining. It's really confusing.
OK, it appears to have something to do with ToLowerInvariant()
- when I removed that method it works just fine.
It appears that ToLowerInvariant()
produces the error. ToLower()
works just fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With