var bobs = new List<Person>(oList).FindAll(delegate(Person p) { return
p.Name == "Bob"; });On Thu, Apr 2, 2009 at 6:17 AM, similitude2009 <[email protected]>wrote: > > Is it possible to use the result of an hql query as source of another > hql query instead of hitting the database a second time ? > > Eg : > ISession oSession = GetSession(); > IQuery oQuery = oSession.CreateQuery("from Person select Person p"); > IList<Person> oList = oQuery.List<Person>(); > oSession.Close(); > > > Now i want to query in memory list instead of database > ISession oSession = GetSession(); > IQuery oQuery = oSession.CreateQuery("from {:pList} select Person p > where p.Name = 'bob' "); > oQuery.AddParameter("pList",oList ); > IList<Person> oList = oQuery.List<Person>(); > oSession.Close(); > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
