Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

OData service - How to use stored procedures

$
0
0

This example illustrates how to use stored procedures with OData. You can learn how to map an entity to a stored procedure in this blog: Stored Procedures in the Entity Framework. This blog describes how to expose a stored procedure in the OData service: oData and Stored Procedures aka Service Operations. We suggest that you use the DevExtreme WCF OData Service project template when creating the OData service.


To execute a web method of the OData service, use the ODataStore.get method. For example:

[JScript]
store.get("TestOperation", { param1: 123, param2: "abc"}).done(...);


Here is a good blog describing how to configure the method so it supports the JSON format: Creating a .NET WCF 4.0 JSON Service.

Question Comments

Added By: Enderson Salas at: 8/25/2014 9:23:07 AM    

Can I use this to a stored procedure with a insert?

Added By: Marion (DevExpress Support) at: 8/26/2014 2:26:39 AM    

Hello Enderson,

To process your recent post more efficiently, I created a separate ticket on your behalf: T144008: OData service - How to use a stored procedure to insert data. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: Chandru Nagrani 2 at: 12/26/2014 10:39:35 AM    

CustOrderHist_Result Where is this defined ? Thanks

Added By: Uriah (DevExpress Support) at: 12/29/2014 12:33:27 AM    

Hello Chandru,

To process your recent post more efficiently, I created a separate ticket on your behalf: T191552: Where is defined CustOrderHist_Result class?. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: Kulasekaran K at: 5/17/2015 11:11:39 AM    

Hi

In below example in dataservice.svc.cs file there is only get method.can u suggest me how to handle update and delete record ?

Added By: Nikolai (DevExpress Support) at: 5/18/2015 1:58:20 AM    Hi Kulasekaran,

Please refer to the ASP.NET WebAPI vs WCF OData ticket where we discussed a similar issue.Added By: York Leung at: 8/10/2015 11:06:28 AM    

Hi,

can you tell me how to do the group on cust-order-hist.dxview dxList by ProductName , how to group the dataSource on cust-order-hist.js?

Added By: Marion (DevExpress Support) at: 8/11/2015 1:17:44 AM    

@York,

To process your recent post more efficiently, I created a separate ticket on your behalf: T276861: dxList - How to group data. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: Yoaldis Pena 3 at: 11/2/2015 12:33:23 PM    

I have a question. Do i have to generate manually a cust-order-hist-view-model.js or I can generate automaticly

Added By: Marion (DevExpress Support) at: 11/2/2015 9:52:50 PM    

@Yoaldis,

To process your recent post more efficiently, I created a separate ticket on your behalf: T307194: OData service - How to use stored procedures - How to create a View. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>