This throws the same Exception as well:
var txAddresses = addresses.Where(address = string.Compare
(address.State, Tx, true) == 0);
I don't control the Database in my situation.
Does anyone know how to do case insensitive string comparison with
NHibernate.Linq?
Hendry Luk wrote:
Just
I also bumped into this problem (non-case-sensitive String.Contains() is a
really common requirement), and still looking for a solution for this..
which apparently still produces the same exception in the recent release of
NH-Linq. Any idea?
Thanks
On Tue, May 5, 2009 at 1:24 PM, Bryan Murphy
var query = from e in db.Employees
where e.FirstName.Contains(a)
select e;
this works, regarding to string.contains.
Tuna Toksöz
Eternal sunshine of the open source mind.
http://devlicio.us/blogs/tuna_toksoz
http://tunatoksoz.com
can you retry your query like this:
string emailAddress=his.EmailAddress.ToLower();
from u in session.LinqUser()
where u.EmailAddress.ToLower() == emailAddress
select u;
Tuna Toksöz
Eternal sunshine of the open source mind.
http://devlicio.us/blogs/tuna_toksoz
http://tunatoksoz.com
I thought that would generate title LIKE'%a%'? (instead of LOWER(title) LIKE
'%a%')
On Mon, Jul 27, 2009 at 5:33 PM, Tuna Toksoz tehl...@gmail.com wrote:
var query = from e in db.Employees
where e.FirstName.Contains(a)
select e;
this works,
Sorry, no joy.. Still exact same exception..
Cheers
On Mon, Jul 27, 2009 at 5:35 PM, Tuna Toksoz tehl...@gmail.com wrote:
can you retry your query like this:
string emailAddress=his.EmailAddress.ToLower();
from u in session.LinqUser()
where u.EmailAddress.ToLower() == emailAddress
select
Quite weirdly, this doesnt work too:
u.EmailAddress.Equals(emailAddress,
StringComparison.CurrentCultureIgnoreCase))
.. even though StringComparison.CurrentCultureIgnoreCase works perfectly
with both StartsWith() and EndsWith() .
And unfortunately, String.Contains() doesn't have overload that