Skip to content

Improve AI documentation to include Logging preferences #2176

@EdLichtman

Description

@EdLichtman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions