views:

660

answers:

2

I would like to write something like DetachedCriteria but I don't want to use the ISession or Nhibernate at all...

All I need is the implementations for ICriterion and Expression.

after writing such Criteria -> I would like to generate an Xml Query or AD-Query or maybe even Query on collection (something like the Linq2Objects)

Do you have such sample? Someone wrote such code?

A: 

Why don't you look in source code for NHibernate for implementation of ICriterion and Expression. It is after all an open source project.

Alex Reitbort
I looked at the source code, the ICriterion and Expression are good for me the problem is the Usage of the ISession inside the ICriteria.
rabashani
+1  A: 

Ayende has an implementation for this.

http://ayende.com/Blog/archive/2006/12/07/ComplexSearchingQueryingWithNHibernate.aspx

Chris Holmes
This is a great post but it is working with db not on objects.
rabashani