Nhibernate Linq Error on Single or Default -


I am pulling my hair from here and I am not sure what is happening because of it

< P> I have the following LINQ query: ..

  returned Session.Linq & LT; CandidateAccountEntity & gt; () SingleOrDefault (p = & gt; p.UserName.ToLower () is equal to (userName.ToLower ()));  

and throwing the following error:

The index was out of range was non-negotiable and should be less than the size of the archive

If I try to wrap with a check:.

  If (session LINQ & LT; CandidateAccountEntity & gt; () any ()) {...}  

then I do the following Error:

Can not execute the query [select. [: Y0_] [counting selection as CandidateAccountEntity (*) SQL] joining the counting (*) [CandidateAccountEntity] from inner CandidateAccountEntity y0_ form this_Interior CFG.Account join this_1_ this account.AccountEntity 1_id This is__AccountEntity 1_id = this_1_.AccountId]

with this =__1_.AccountId] with an internal exception of this_1_:

{ "` `'' '' '' '' '' '' '' '' Any help would be too much, too much grace. I do not want to get stuck on Friday afternoon:

ToLower is not supported in National Highway 2. X Link Provider It works with integrated provider in 3.x


Comments