Perhaps writing a guide about how use QueryOver we can clean the API a
little be more removing some methods [?]

On Sun, Jul 18, 2010 at 3:56 PM, Richard Brown (gmail) <
[email protected]> wrote:

>  Oh - I forgot about that.  [image: Smile emoticon]
>
> That's already there - you can also write (since rev 5004):
>
> criteria.Where(l => !l.Id.IsIn(ClickedItems))
>
>
>  *From:* Fabio Maulo <[email protected]>
> *Sent:* Sunday, July 18, 2010 2:05 PM
> *To:* [email protected]
> *Subject:* Re: [nhusers] Not In with QueryOver
>
> Richard,
> would be possible the same solution adopted for "IsLike" ?
>
> On Sun, Jul 18, 2010 at 7:50 AM, Richard Brown (gmail) <
> [email protected]> wrote:
>
>>  I thought you could also do this:
>>
>> criteria.Where(Restrictions.On<Listing>(l => l.Id).Not.IsIn(ClickedItems
>> ));
>>
>> ... but it looks like I missed that syntax (my mistake - I'll add it).
>> You could also (assuming the IQueryOver has the required types) use:
>>
>> criteria.WhereRestrictionOn(l => l.Id).Not.IsIn(ClickedItems);
>>
>>  *From:* Cristian Prieto <[email protected]>
>> *Sent:* Friday, July 16, 2010 6:47 PM
>> *To:* [email protected]
>> *Subject:* Re: [nhusers] Not In with QueryOver
>>
>> That was my first thought... but It was too much easy to be true... :P
>>
>> Now I love QueryOver even more than before :)
>>
>> -- Cristian
>>
>>
>> On Fri, Jul 16, 2010 at 11:19 AM, Fabio Maulo <[email protected]>wrote:
>>
>>> Have you tried this
>>>
>>> criteria.Where(!Restrictions.On<Listing>(l => l.Id).IsIn(ClickedItems));
>>>
>>>
>>>   On Fri, Jul 16, 2010 at 1:59 PM, Cristian Prieto 
>>> <[email protected]>wrote:
>>>
>>>>  Hi pals,
>>>>
>>>> I've been playing a little with new QueryOver with NH trunk, I really
>>>> love it... But after reading and searching a little in internet I could not
>>>> find how to do a "Not In" query using QueryOver and turns this into a
>>>> negative query:
>>>>
>>>> Snippet
>>>>
>>>> SnippetISession session = Factory.GetCurrentSession();
>>>> IQueryOver<Listing, Listing> criteria = session.QueryOver<Listing>();
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> criteria.Where(Restrictions.On<Listing>(l => l.Id).IsIn(ClickedItems));
>>>>
>>>> I mean, *IsIn* must become a *IsNotIn*...
>>>>
>>>> Thanks a lot for your help!
>>>>
>>>> -- Cristian
>>>>
>>>> --
>>>> 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]<nhusers%[email protected]>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/nhusers?hl=en.
>>>>
>>>
>>>
>>>
>>> --
>>> Fabio Maulo
>>>
>>> --
>>> 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]<nhusers%[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]<nhusers%[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]<nhusers%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/nhusers?hl=en.
>>
>
>
>
> --
> Fabio Maulo
>
> --
> 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]<nhusers%[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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>



-- 
Fabio Maulo

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

<<Emoticon1.gif>>

<<35E.png>>

Reply via email to