OQuery - Building OData query fragments without LINQ

OQuery is a library which gives you a fluent style interface for building OData Url Fragments in javascript or C#. Neither Javascript or Silverlight for WP7 support LINQ and so this library in thoses cases.

C# (90.2 KB)
 
 
 
 
 
4.9 Star
(9)
3,256 times
Add to favorites
10/10/2011
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Typescript?
    2 Posts | Last post October 23, 2013
    • Is there a typing for this?
      
      It would be great if this could become more standalone and not require rx, and worked with typescript's typing system to be able to get rid of the lets since the object type is known and it could be strongly typed everywhere. This portion is the only piece left that we don't have strongly typed everything since we t4 gen our interfaces and ko viewmodels.
      
      Thanks!
    • If you don't want to use RX don't include the observable.js file and, simply use ToUri() instead of ToObservable. 
      
      I'm very active in Typescript but not really certain how I would use typescript to get rid of the let...did you have a specific idea in mind?
  • Any plans on supporting October 2011 CTP
    1 Posts | Last post April 08, 2012
    • It has support for Any/All operators which are very handy!
      i.e. http://stackoverflow.com/questions/9278044/wcf-data-services-many-to-many-with-filter
  • Issue with the Contains operator
    3 Posts | Last post March 28, 2012
    • First, thanks for this useful library.
      I noticed that the Contains operator, which the library translates to the substringof OData operator is not implemented right.
      substringof takes as arguments the string literal to be tested then the name of an entity field, but the library makes the inverse. It emits substringof that takes the field name then the literal.
    • FYI I just released v1.0.4 version which fixes this as well as a nuget package
    • Thank you
      I've used your library in a previous project, and I'll use it in a new one
  • Undefined on lambda expression
    2 Posts | Last post September 10, 2011
    • I tried your demo on a a CRM 2011 server. I included all script corectly but I always got multiple undefined when I called toUri. They appears when I write a "lambda expression" where clause.
      
      Any Idea?
    • What browser are you using?  The lamda expression (aka passing a javascript function) relies on a browsers ability to call toString() on the function itself to get a string representation of it which is then massaged into the $filter field. 
      
      I have only tested it on IE9, and suspect other browsers don't support it.
  • Nice Idea!
    2 Posts | Last post July 06, 2011
    • Any upgrades towards datajs 1.0 ?
      
      Also can it be used without datajs in the first place? (as an alternative i.e. without extra 50kb+)
    • Yes, the only part which is datajs dependent is the ToObservable() function. Just update/override with whatever you want.  It is 99% about generating the correct URI.