Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6120685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:41:49+00:00 2026-05-23T15:41:49+00:00

I would like to know if there’s a good ORM that can automate some

  • 0

I would like to know if there’s a good ORM that can automate some of the manual work I have to do right now. Our application uses stored procedures heavily, meaning that any interaction with the database goes through a stored procedure.

Right now, I have to call stored procedures in the traditional way, and it’s quite tedious. Is there an ORM that does a good job at dealing with stored procedures that:

  1. Have input/output parameters that are structured, meaning table valued types
  2. Easily allow for output parameters to be user-defined types, both scalar and table valued
  3. Return multiple record sets
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:41:49+00:00Added an answer on May 23, 2026 at 3:41 pm

    Dapper has fairly extensive stored procedure support.

    The trivial:

    create proc spGetOrder
        @Id int
    as
    select * from Orders where Id = @Id
    select * from OrderItems where OrderId = @Id
    

    It can be mapped with the following.

    var grid = cnn.QueryMultiple("spGetOrder", new {Id = 1}, commandType: CommandType.StoredProcedure);
    var order = grid.Read<Order>();
    order.Items = grid.Read<OrderItems>();
    

    Additionally you have support for:

    1. A multi-mapper that allows you single rows to multiple objects
    2. Input, output and return parameter support
    3. An extensible interface for database specific parameter handling (like TVPs)

    So for example:

    create proc spGetOrderFancy
        @Id int,
        @Message nvarchar(100) output
    as
    set @Message = N'My message'
    select * from Orders join Users u on OwnerId = u.Id where Id = @Id
    select * from OrderItems where OrderId = @Id
    return @@rowcount
    

    Can be mapped with:

    var p = new DynamicParameters();
    p.Add("Id", 1);
    p.Add("Message",direction: ParameterDirection.Output);
    p.Add("rval",direction: ParameterDirection.ReturnValue);
    var grid = cnn.QueryMultiple("spGetOrder", p, commandType: CommandType.StoredProcedure);
    var order = grid.Read<Order,User,Order>((o,u) => {o.Owner = u; return o;});
    order.Items = grid.Read<OrderItems>();
    
    var returnVal = p.Get<int>("rval");
    var message = p.Get<string>("message");
    

    Finally, Dapper also allows for a custom parameter implementation:

    public interface IDynamicParameters
    {
        void AddParameters(IDbCommand command);
    }
    

    When implementing this interface you can tell Dapper what parameters you wish to add to your command. This allow you to support table-valued parameters and other database specific features.

    You’re using it now on Stack Overflow…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know if there are any tools that can help me
I would like to know if there is some way to share a variable
Would like to know if there is any resource on the web that conveniently
I would like to know if anyone can recommend a good library to generate
I would like to know whether there is a jQuery function which can check
I would like to know whether i can assume that same operations on same
I would like to know if there is anyway I can set one of
I would like to know if there is anyway I can make a parent
I would like to know if there is any way we can see programatically
I would like to know if there is any way to add custom behaviour

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.