Hi,

I've got the same problem.
QueryOver don't understand linq/lambda expression. To solve it, try :

IList<Product> list = _session.QueryOver<Product>()
           .WhereRestrictionOn(x =>
x.Code).IsInsensitiveLike(code.ToUpper())
           .List<Product>();

Neric

On 28 avr, 22:41, "Christian I." <[email protected]> wrote:
> Hello,
>
> When I do this :
>    public bool IsCodeExist(string code)
>          {
>              bool result = false;
>
>              IList<Product> list =
> _session.QueryOver<Product>().Where(x => x.Code.ToUpper() ==
> code.ToUpper()).List<Product>();
>
>              if (list.Count != 0)
>                  result = true;
>
>              return result;
>          }
>     }
>
> I receive this error :
>
> "Unrecognised method call in epression x.Code.ToUpper()"
>
> It's strange isn't it ?
>
> Thanks,

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to