DapperLib / DapperLib/Dapper

Dynamic Parameters with Table Valued Parameters

Open
#364 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
18.4k
Forks
3.7k
Avg merge
5h 8m
Merged PRs (30d)
1

Description

I have posted the same question @

http://stackoverflow.com/questions/33087629/dapper-dynamic-parameters-with-table-valued-parameters

Didn't got a response, therefore tried and posted my own work around as a response. Still looking for an out of the box solution. Issue is fairly simple, if I have a Output Parameter, Return Value parameter along with a Input parameter which is Table type, now we need Dynamic parameters for adding parameters to execute query, but it seems not feasible to add Dynamic Parameters which is Table Valued. It leads to an error:

System.Data.SqlClient.SqlException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect.

Any suggestion to work around it?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the stored procedure scenario described: DynamicParameters containing output and return-value parameters alongside a table-valued input parameter. Read Dapper's DynamicParameters handling and the SqlClient table-valued parameter behavior; done means the combination executes without the TDS RPC error and no workaround is required.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.