Odata Query Cheat Sheet



Odata query cheat sheet 2020

Odata Query Cheat Sheet Nintex

If you work with WCF Data Services, at some point, you will probably need to call a stored procedure to return result of a complex query. If you wonder how to wrap a call to stored procedure into a WCF Data Service call read on.

SharePoint OData Filter query cheat sheet. The cheat sheet is available for all subscribes. Subscribe on the right side to get a link to download the cheat sheet. Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate? If you are intending to use OData queries and expand query parameters, then here is a great post by Lin Zaw Win on how to do it: Power Automate List Records – Use Expand Query to Retrieve Related Data in flow; CDS (current environment) connector’s “List Records” action has a maximum buffer size configured. OData for SAP Business ByDesign Analytics – great guide on SAP ByD OData; SAP help page for 1605 release; 64 bit version of MS Office, or 32 bit with patch mentioned by Ken Puls in his blog. More data – more memory, simple rule. Library of Power Query functions on GitHub; Massive data extraction from SAP ByDesign. Reference Services. This OData V4 sample service is built with Restier which is a turn-key library for building RESTful services, it covers most V4 features and its source code is located at this link. The new OData V4 service designed for real scenarios and covering most V4 features. A simple OData v4 service optimized for quick browser demos.

Examples

The quick pointer is here and below there is a summary of the required steps:

  1. You need to create a service method decorated with “WebGet” attribute. This method needs to return IQueryable<yourEntity>.
  2. Inside this method you will call a stored procedure, usually wrapped in Entity Framework Function Import Call, returning <yourEntity>.
  3. If you use a stored procedure to return entities then, very likely, you are optimizing for performance. If returned entities have related child entities that you also want to return, you have two options:
    1. Do nothing and let WCF Data Services handle that. You will be surprised how smart the oData is .
    2. You are returning a big result set and your goal is to optimize the performance (you really do not want to lazy load 30k child entities). In such a case, execute another Function Import call and load your child entities. Once again, you will be surprised how smart the oData is . Just make sure that you disable Lazy Loading on the Context object.
  4. Now you can go back to your browser or to your .NET client and execute something like this: http://localhost/my.svc/CallMySp?searchTerm=’my term’&$expand=MyChildEntities. As I mentioned before .. you will be surprised how nicely it works.

Odata Query Cheat Sheet 2019

Example service method returning entities from stored procedure:

Odata Query Cheat Sheet

Example client code: