Hello Guys, I have a linq query with NHibernate using Session.Query<T>
method and I in this query I Fetch some complex properties and collection
properties. I would like to know, how cna I add an condition with IN
operator from an int[] ? Look my code:

public IEnumerable<Product> GetProducts(int[] idCategories)
{
    // how to add IN condition here or a subquery
    var query =
Session.Query<Product>().Where(?????).Fetch(x=>xCategory).FetchMany(x=>x.Status).ThenFetch(x=>x.Item);

    return query.ToList();
}

I have another method doing a query to get this int[] and I would like to
apply it here, or if is there any way to add this subquery on the IN
operator, I really appreciate!

Thank you!

-- 
______________________________________
Felipe B. Oriani
felipeoriani.com.br [email protected]
@felipeoriani<http://www.twitter.com/felipeoriani>
 LinkedIn <http://br.linkedin.com/in/felipeoriani>
Facebook<http://www.facebook.com/felipeoriani>


"...Trabalhe quanto puder, tornando-se útil quanto possível..." , por André
Luiz

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