[英]Implementing NHibernate DetachedCriteria-like
I would like to write something like DetachedCriteria but I don't want to use the ISession or Nhibernate at all... 我想写类似DetachedCriteria的东西,但是我根本不想使用ISession或Nhibernate ...
All I need is the implementations for ICriterion and Expression. 我需要的只是ICriterion和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) 编写了这样的条件后->我想生成一个Xml Query或AD-Query甚至是集合查询(例如Linq2Objects)
Do you have such sample? 你有这样的样品吗? Someone wrote such code?
有人写过这样的代码吗?
Ayende has an implementation for this. Ayende为此提供了一个实现。
http://ayende.com/Blog/archive/2006/12/07/ComplexSearchingQueryingWithNHibernate.aspx http://ayende.com/Blog/archive/2006/12/07/ComplexSearchingQueryingWithNHibernate.aspx
Why don't you look in source code for NHibernate for implementation of ICriterion and Expression. 您为什么不查看NHibernate的源代码来实现ICriterion和Expression。 It is after all an open source project.
毕竟这是一个开源项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.