DapperLib / DapperLib/Dapper

Improve AI documentation to include Logging preferences

Open
#2,176 1 comment 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

Hi all,

So I'm a big fan of the RAG model you used for Dapper AI, and the fact that it can produce examples. I'm also a big fan of the fact that it's been added to Context7, so it can be used within a copilot workflow.

One problem I've seen is there is, according to the AI, no way to log. You can theoretically create your own DbCommand which is a layer of abstraction on top of SqlDbCommand, but unfortunately that doesn't work with Dapper, since you have to give it text.

Therefore, AI suggests that I run the query twice, once to get the raw output and the other time to parse it. Which, as you may be aware, is a non-starter.

While looking online I found this stack overflow question:
https://stackoverflow.com/questions/18529965/is-there-any-way-to-trace-log-the-sql-using-dapper

It appears to me that you all, the library developers actually recommend using MiniProfiler library for logging?

Even if you weren't using MiniProfiler, but were using a different library, it would still be super helpful to give the context of "if you need, wrap your SqlConnection with a Sql Profiler library" or something like that.

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 reviewing Dapper's AI documentation and the linked Stack Overflow question, then verify how MiniProfiler or another SQL profiling library should be described. Done when the documentation explains the relevant logging approach and context without suggesting that users execute a query twice.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.