DapperLib / DapperLib/Dapper

Mapping a cascade dataobject that relies on multiple tables

Open
#1,065 0 comments 0 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

Hello,
I'm currently porting the DAL layer written with EF6 to Dapper, and I'm facing some issue...before writing here I also posted on StackOverflow but with no luck.

I'm in the scenario that I've got an object, let's say TableA, that has some related object on TableB that turn on TableC

I've tried to use the overload of Query but it I'm not able to perform the second split

var sql = @"SELECT  *
        FROM   TABLE_A A
        INNER JOIN TABLE_B B on A.IdField = b.IdField WHERE SOME_CONDITION"

                var res = connection.Query<TABLE_A, TABLE_B, TABLE_A>(
                    sql, (item1, item2) =>
                    {
                        item1.TABLE_B = item2;

                        return item1;
                    },splitOn ="IdField")

                    [Omiss]

Is it possible? How?Thanks

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

The issue names Dapper's Query overload, splitOn, and a TABLE_A/TABLE_B/TABLE_C mapping scenario; start by tracing the multi-type Query entry point and splitOn behavior. Confirm whether nested multi-table mapping is supported and define what a complete answer or missing capability would need to demonstrate.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
backend, database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.