WebApi Controller that just returns rowsAffected from Stored Procedure

Thread is closed for posting
2 posts, 0 answers
  1. Tom
    Tom avatar
    9 posts
    Member since:
    Feb 2013

    Posted 03 Jan 2017 Link to this post

    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.
  2. Tom
    Tom avatar
    9 posts
    Member since:
    Feb 2013

    Posted 13 Jan 2017 in reply to Tom Link to this post

    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

     

     

Back to Top