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?