I want to search address by linq, I use in 2 ways:
Linq:
_db.Address.Where(address => address.FullName.Contains(text));
Dynamic Linq:
_db.Address.Where("FullName.Contains(@0)", text);
When I try:
-> text
value is string (doesnot contain space
), the result in 2 querys is the same,
-> text
value is number
or string
with space
inside, the query 1 return right result, and the second one return null
I don't have Sql Profiler
, so I cannot check the general sql.
How to fix this issus and how to work with dynamic linq
in right way?