Query object implementation examples [closed]
Asked Answered
S

4

5

Can anyone recommend good tutorial, implementation or sample code on Query object pattern usage, in C#(Java...)?

I haven't found much with google.

Shanty answered 15/2, 2010 at 10:36 Comment(0)
A
4

With LINQ being almost everywhere, are you sure you need to reimplement the Query Object?

Basically, you can treat all classes from System.Linq.Expressions to be a good implementation of a Query Object pattern.

Afterthought answered 15/2, 2010 at 10:38 Comment(3)
I tend to agree with this. Can anyone give me a reason why not to use LINQ instead of an implementation of the Query Object Pattern?Pickar
@Pickar maybe because it isnt supported by his database provider??Rateable
over WCF (if you are stuck with a non supporting binding)Mercia
T
1

I suggest Martin Fowler's Query Object Pattern (http://martinfowler.com/eaaCatalog/queryObject.html). Get his book "Patterns of Enterprise Application Architecture", you'll find sample implementation there.

Turnstile answered 8/7, 2010 at 13:46 Comment(0)
A
0

I wrote a nice query object library for NHibernate. Check it out here: https://github.com/shaynevanasperen/NHibernate.Sessions.Operations

Appolonia answered 13/8, 2015 at 19:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.