This is a migrated thread and some comments may be shown as answers.

WebApi Controller that just returns rowsAffected from Stored Procedure

1 Answer 32 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tom
Top achievements
Rank 1
Tom asked on 03 Jan 2017, 07:33 PM
I have an Open Access Web Api application that successfully brings back datasets from tables and stored procedures with parameters.  I am stuck on a controller that just runs a stored procedure with parameters and returns the rowsAffected.  Does anyone have an example of this?  I know this has to be the easiest thing to do but my transaction gets lost in ApiControllerActionSelector and returns and 400 error.

1 Answer, 1 is accepted

Sort by
0
Tom
Top achievements
Rank 1
answered on 13 Jan 2017, 08:09 PM

I will answer my own question.  Apparently Progress has taken all of the helpfulness from the Telerik people. 

At the end of the day, all you need is a controller in the Web Api application.  No models, no metadata, nothing else.  Inherit just the stock APIController and add a Getxxx class similar to this documentation example.

http://docs.telerik.com/data-access/developers-guide/low-level-ado-api/executing-stored-procedures/data-access-tasks-adonet-stored-procedures-out-value-params

 

 

Tags
Development (API, general questions)
Asked by
Tom
Top achievements
Rank 1
Answers by
Tom
Top achievements
Rank 1
Share this question
or