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.

user137348
  • 10,166
  • 18
  • 69
  • 89

4 Answers4

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.

Anton Gogolev
  • 113,561
  • 39
  • 200
  • 288
3

From Chad Myers:

Part 1: http://www.lostechies.com/blogs/chad_myers/archive/2008/08/01/query-objects-with-the-repository-pattern.aspx

Ahmet Recep Navruz
  • 713
  • 11
  • 14
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.

Buhake Sindi
  • 87,898
  • 29
  • 167
  • 228
0

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

Shayne
  • 195
  • 1
  • 10