Sql To Caml Query Converterlite

2020. 2. 11. 00:13카테고리 없음

You might wonder how to use CAML query in your SharePoint 2013 REST endpoints. Basically you can’t pass CAML into REST request (at least till date, there’s so documented approach published). However, REST by itself provides the querying feature which somehow covers almost all CAML querying features. I’ll try to explain today how you can convert your CAML into REST request. Generate REST Request UrlFirst of all let’s play with a tool called that will be used for REST request generation later from CAML.Let’s describe the process step by step.

Download LINQPad: The tool that I’m going to use for generating REST request url can be downloaded from. So please download the tool and run it. Add Connection Provider: Once you run the tool click ‘Add Connection’ and then select ‘WCF Data Services (OData)’ data context provider as shown below:Figure 1: Add WCF Data Connection. Connect to SharePoint Server: In the connection page, select the url as as shown below:Figure 2: ListData WCF Connection. Built-in Query Option: Use built-in template for querying as shown below. Right click on your list/library and use any built-in template you want.Figure 3: Use built-in template for generating query.

Sql to caml query converter lite 1

Sql To Caml Query Converter Lite 1

Generate Query: Once you finish the query, execute it and click the ‘Request Log’ button to see the REST request generated as shown below:Figure 4: C# query and REST requestFor details REST operator you can use for SharePoint 2013 REST endpoint can be found at under “Table 3. OData query operators”. For licensed version, LINQPad provides intellisense which really exciting feature.Examples of C# query and corresponding REST URLI’ve provided few basic examples of using the LINQPad tool to generate queries.