2

I've recently started using the DynamicQuery API, and it quickly became apparent that it has numerous limitations. I've found at least one improvement online: support for enum arguments, but it's pretty clear that this API is not actively maintained (if at all).

In case I'm wrong and there is somebody maintaining an improved version - please post a link!

Alternatively, a separate, active project with similar goals would also be of interest.

(Clarification: I'm looking to parse strings at runtime.)

Roman Starkov
  • 59,298
  • 38
  • 251
  • 324
  • Out of curiosity, what limitations are you running into? – Robert Harvey Jul 12 '09 at 18:26
  • One such limitation is mentioned in the linked article - can't pass StringComparison.OrdinalIgnoreCase to StartsWith(). There were a couple of other minor things - e.g. the absense of the ?? operator. On the whole it's outright impressive though - it goes a long way as it is. – Roman Starkov Jul 12 '09 at 18:48

2 Answers2

2

In the end we just implemented some of the features we missed by editing the source code. Added support for passing in a static class as an "external" (DynamicQuery's terminology), support for calling methods on this static class, and type inference if any such methods are generic.

I suspect there isn't much demand for this, so I didn't bother making it available anywhere. Let me know if you think otherwise.

Edit: due to a request, DynamicQuery Enhanced is now available on BitBucket. Expect to be underwhelmed; take a look at this Info and this list of tweaks.

Roman Starkov
  • 59,298
  • 38
  • 251
  • 324
  • @[Richard Hein] - alright, it's now on BitBucket at http://bitbucket.org/dynamicquery/dynamicqueryenhanced/ (full list of tweaks at http://bitbucket.org/dynamicquery/dynamicqueryenhanced/wiki/Tweaks ). Expect to be underwhelmed though :) It's old and has not been maintained up-to-date with more recent "official" releases of DynamicQuery. – Roman Starkov Mar 29 '10 at 18:14
1

I've seen PredicateBuilder before mentioned (here on Stackoverflow) as an alternative. I've not used it though, but it might be useful to you.

RichardOD
  • 28,883
  • 9
  • 61
  • 81
  • As far as I can tell, it's not an alternative - it doesn't parse strings. It can probably be used to do more things with DynamicQuery though. – Roman Starkov Jul 12 '09 at 18:38
  • I guess it depends what you want to do. I included as an answer as it does create dynamic queries- and is very useful when you wish to build or statements. Perhaps you should update your question to state that you don't wish to utilize compile time checking? – RichardOD Jul 12 '09 at 18:46
  • 1
    Compile-time checking and runtime parsing are not mutually exclusive. – JoshJordan Jul 12 '09 at 20:13
  • @Josh you are absolutely right. I was going to point this out but I decided not to bother. – RichardOD Jul 12 '09 at 20:34