Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Paul Sørensen 304 posts 650 karma points
    Oct 21, 2013 @ 17:52
    Paul Sørensen
    0

    Calling stored proc with DatabaseContext in the REST API

     

    Hi

    How can I call a store proc using the DatabaseContext exposed in the Rest API?

    ex.

    exec EventsByYear @year

    returning List<EventInfo>()

  • Paul Sørensen 304 posts 650 karma points
    Oct 23, 2013 @ 22:56
    Paul Sørensen
    100

    Hi

    Found the solution

    databaseContext.EnableAutoSelect = false;  // this was shat caused the problem

    var list = databaseContext.Fetch<EventInfo<("EXEC EventsByYear @Year", new {@Year = 2013});

    /Paul S

Please Sign in or register to post replies

Write your reply to:

Draft