Are there any good examples of query classes, other than specification
(which are already implemented, for example, in NCommon)?
There are two different scenarios, I believe:

- If there is need to cross application domains (e.g., web services or
remoting)
- If not

What would such a class look like?

Thanks,

RP

On Sep 7, 2:36 am, Bevan Arps <[email protected]> wrote:
> > In your opinion, which is the best way to implement the query object
> > pattern:
>
> > 1) by using IQueryable/IQueryable<T>
> > 2) by using ICriteria/DetachedCriteria
> > 3) custom classes
>
> > What I mean is, assuming that we have an object that stores query
> > parameters (page size, page index, filters, etc) that goes all the way
> > to the presentation layer, which is the better option for doing so, so
> > that it is possible to enhance the original query?
>
> As soon as you need to cross a process boundary - from an application
> server to a client, or from webserver to browser - anything that
> depends on IQueryable or ICriteria is going to have associated
> "baggage" that becomes a liability.
>
> Having a custom class gives you a lot more control over how this plays
> out. There are a myriad of patterns you *could* follow - in your
> shoes, I'd start with the "Specification" pattern and branch out if
> that didn't work for me.
>
> Just my 2c.
> Bevan.
--~--~---------~--~----~------------~-------~--~----~
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