DapperLib / DapperLib/Dapper.Contrib

Scope_Identity on Insert

Open
#137 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
293
Forks
109
PR merge metrics
No merged PRs in 30d

Description

The InsertAsync method is supposed to return the key of the record just inserted. For me, I get a 0. I've spent a half day looking for answers and if there was a remedy (SET NOCOUNT ON, for instance) I tried it.

I'm using SQL Server.

The only thing I can do here is report it as an issue.

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 InsertAsync and SQL Server but does not identify a file, test, or reproducible schema. Start by locating the InsertAsync implementation and related tests, then reproduce the reported zero key with SQL Server; done means the inserted record's key is returned correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.