Yes, I have code that is now broken and I am not sure why:

                return new List<JobType>(
                     from jobType in session.Query<JobType>()
                     where
securityContext.CurrentUser.Disciplines.Contains(jobType.Discipline)
                     select jobType);

This code was working with nh 2.1.2GA but now I get "Specified method
is not supported".

When I rewrote it to use QueryOver instead:

                return session.QueryOver<JobType>()
                    .Where(x =>
securityContext.CurrentUser.Disciplines.Contains(x.Discipline))
                    .List();

This way I get a more descriptive message:

Unrecognised method call:
System.Collections.Generic.ICollection`1[[PD.Insulation.Domain.Discipline,
PD.Insulation.Domain, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null]]:Boolean
Contains(PD.Insulation.Domain.Discipline)




On Fri, Aug 6, 2010 at 8:46 AM, James Gregory <[email protected]> wrote:
> Is there anything in particular you're having trouble with?
>
> On Aug 6, 3:24 pm, Kev <[email protected]> wrote:
>> Now that nh3 has released a new/updated linq provider, I was wondering
>> if there are a list of differences between this version (nh3 linq) and
>> nhibernate.linq 1.0? I am trying to change to nh3 but there is
>> obviously more involved than changing session.linq to session.Query.
>>
>> A pointer to some documentation would be fantastic...
>>
>> TIA
>
> --
> 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.
>
>

-- 
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