{"slug": "dapper", "name": "Dapper", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 7, "commenters": 11, "warners": 1, "score": 5.365, "rising": -0.96, "first": "2025-11-03", "latest": "2026-08-07", "why": "The reason I like Dapper [2] is that it lets you use your own sql.", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 7, "neutral": 3, "compare": 1, "warn": 1}, "spark": [1, 2, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "The reason I like Dapper [2] is that it lets you use your own sql.", "kind": "", "icon": true, "domain": null, "github_repo": "github.com/dapperlib/dapper", "official_url": "https://github.com/DapperLib/Dapper", "pricing": "", "aliases": ["Dapper"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 787475648, "item_id": 49217228, "url": "https://news.ycombinator.com/item?id=49217228", "by": "kristianp", "date": "2026-08-07", "version": null, "stance": "recommend", "quote": "The reason I like Dapper [2] is that it lets you use your own sql.", "excerpt": "Pleasant to hear about the Object-Relational Impedance Mismatch [1], haven't heard about that concept for a long time. The reason I like Dapper [2] is that it lets you use your own sql. [1] https://en.wikipedia.org/wiki/Object%E2%80%93relational_impedance_mismatch [2] https://github.com/DapperLib/Dapper", "context": "", "use_case": "database access in .NET", "switched_from": "", "story": "Carl's Required Reading"}, {"id": 780711552, "item_id": 48794472, "url": "https://news.ycombinator.com/item?id=48794472", "by": "bsuvc", "date": "2026-07-05", "version": null, "stance": "recommend", "quote": "I think Dapper comes closest to what you are describing", "excerpt": "In .NET, I think Dapper comes closest to what you are describing. It does the object mapping, but you still write the queries as SQL. https://github.com/DapperLib/Dapper", "context": "", "use_case": "SQL object mapping for .NET", "switched_from": "", "story": "What ORMs have taught me: just learn SQL (2014)"}, {"id": 761351344, "item_id": 47584459, "url": "https://news.ycombinator.com/item?id=47584459", "by": "bob1029", "date": "2026-03-31", "version": null, "stance": "recommend", "quote": "Dapper is the only regular thing I can come up with.", "excerpt": "\"Batteries included\" ecosystems are the only persistent solution to the package manager problem. If your first party tooling contains all the functionality you typically need, it's possible you can be productive with zero 3rd party dependencies. In practice you will tend to have a few, but you won't be vendoring out critical things like HTTP, TCP, JSON, string sanitation, cryptography. These are beacons for attackers", "context": "works in regulated software", "use_case": "data access", "switched_from": "", "story": "Axios Compromised on NPM \u2013 Malicious Versions Drop Remote Access Trojan"}, {"id": 750803156, "item_id": 46925197, "url": "https://news.ycombinator.com/item?id=46925197", "by": "seabrookmx", "date": "2026-02-07", "version": null, "stance": "recommend", "quote": "using tools like Dapper", "excerpt": "In Instagram's case, they do not use the ORM or Admin, and have an internal fork of the request handling/middleware stack that is 100% async (before the recent async bits were added to Django)[1]. It's great that Django's API design allowed them to move this way easily, but they aren't actually using Django in the traditional sense because it can't handle their scale. I've found that with the Django ORM and DRF espec", "context": "", "use_case": "", "switched_from": "", "story": "France's homegrown open source online office suite"}, {"id": 741756256, "item_id": 46359766, "url": "https://news.ycombinator.com/item?id=46359766", "by": "morkalork", "date": "2025-12-22", "version": null, "stance": "recommend", "quote": "I worked at a company where we used Dapper with plain SQL.", "excerpt": "I worked at a company where we used Dapper with plain SQL. Like the sibling commenter said, simplicity. There were never [ORM] issues to debug and queries could easily be inspected.", "context": "", "use_case": "", "switched_from": "", "story": "The Rise of SQL:the second programming language everyone needs to know"}]}], "caveats": [{"label": "", "summary": "", "quotes": [{"id": 736885121, "item_id": 46055320, "url": "https://news.ycombinator.com/item?id=46055320", "by": "b0m", "date": "2025-11-26", "version": null, "stance": "warn", "quote": "it brings nothing to the table but strings and bunch of SQL", "excerpt": "We use newer Entity Framework (Core) in a few large projects with zero issues. Even have Dapper and moving away from it as it brings nothing to the table but strings and bunch of SQL.", "context": "", "use_case": "", "switched_from": "", "story": "Reinventing how .NET builds and ships (again)"}]}], "who": [{"by": "bob1029", "context": "works in regulated software", "url": "https://news.ycombinator.com/item?id=47584459", "date": "2026-03-31"}, {"by": "ziml77", "context": "works with C# and MS SQL Server for many years", "url": "https://news.ycombinator.com/item?id=47283225", "date": "2026-03-06"}], "tags": [], "use_cases": ["data access", "database access in .net", "sql object mapping for .net", "c# database queries", "distributed request tracing", "performance-critical queries"], "compared": [{"slug": "microsoft-sql-server", "name": "Microsoft SQL Server", "co": 3, "switched_from": 0, "switched_to": 0}, {"slug": "entity-framework-core", "name": "Entity Framework Core", "co": 1, "switched_from": 0, "switched_to": 1}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=47282230", "title": "C# Strings Silently Kill Your SQL Server Indexes in Dapper", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=49135457", "title": "Carl's Required Reading", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48742175", "title": "What ORMs have taught me: just learn SQL (2014)", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47582220", "title": "Axios Compromised on NPM \u2013 Malicious Versions Drop Remote Access Trojan", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47534003", "title": "Spring Boot Done Right: Lessons from a 400-Module Codebase", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46923736", "title": "France's homegrown open source online office suite", "mentions": 1}], "sentiment_by_month": {"2025-11": {"recommend": 1, "compare": 1, "warn": 1}, "2025-12": {"recommend": 2}, "2026-01": {}, "2026-02": {"recommend": 1}, "2026-03": {"neutral": 3, "recommend": 1}, "2026-04": {}, "2026-05": {}, "2026-06": {}, "2026-07": {"recommend": 1}, "2026-08": {"recommend": 1}, "2026-09": {}, "2026-10": {}}, "versions": [], "version_unnamed": 0, "family_ref": null, "runs_on": null, "lines": [], "quotes": [{"id": 787475648, "item_id": 49217228, "url": "https://news.ycombinator.com/item?id=49217228", "by": "kristianp", "date": "2026-08-07", "version": null, "stance": "recommend", "quote": "The reason I like Dapper [2] is that it lets you use your own sql.", "excerpt": "Pleasant to hear about the Object-Relational Impedance Mismatch [1], haven't heard about that concept for a long time. The reason I like Dapper [2] is that it lets you use your own sql. [1] https://en.wikipedia.org/wiki/Object%E2%80%93relational_impedance_mismatch [2] https://github.com/DapperLib/Dapper", "context": "", "use_case": "database access in .NET", "switched_from": "", "story": "Carl's Required Reading"}, {"id": 780711552, "item_id": 48794472, "url": "https://news.ycombinator.com/item?id=48794472", "by": "bsuvc", "date": "2026-07-05", "version": null, "stance": "recommend", "quote": "I think Dapper comes closest to what you are describing", "excerpt": "In .NET, I think Dapper comes closest to what you are describing. It does the object mapping, but you still write the queries as SQL. https://github.com/DapperLib/Dapper", "context": "", "use_case": "SQL object mapping for .NET", "switched_from": "", "story": "What ORMs have taught me: just learn SQL (2014)"}, {"id": 761351344, "item_id": 47584459, "url": "https://news.ycombinator.com/item?id=47584459", "by": "bob1029", "date": "2026-03-31", "version": null, "stance": "recommend", "quote": "Dapper is the only regular thing I can come up with.", "excerpt": "\"Batteries included\" ecosystems are the only persistent solution to the package manager problem. If your first party tooling contains all the functionality you typically need, it's possible you can be productive with zero 3rd party dependencies. In practice you will tend to have a few, but you won't be vendoring out critical things like HTTP, TCP, JSON, string sanitation, cryptography. These are beacons for attackers", "context": "works in regulated software", "use_case": "data access", "switched_from": "", "story": "Axios Compromised on NPM \u2013 Malicious Versions Drop Remote Access Trojan"}, {"id": 761237153, "item_id": 47577322, "url": "https://news.ycombinator.com/item?id=47577322", "by": "tracker1", "date": "2026-03-30", "version": null, "stance": "neutral", "quote": "generally with Dapper", "excerpt": "Similar for C# in practice... I actually really like a lot of modern C#, though I use FastEndpoints as an (imo) upgrade to minimal API surface, generally with Dapper and as few layers as possible in a feature oriented structure (single project as long as possible). I had to split off some logic into a separate shared library and worker service app from the api app on the server. Client is a React SPA.", "context": "", "use_case": "data access", "switched_from": "", "story": "Spring Boot Done Right: Lessons from a 400-Module Codebase"}, {"id": 756531600, "item_id": 47283225, "url": "https://news.ycombinator.com/item?id=47283225", "by": "ziml77", "date": "2026-03-06", "version": null, "stance": "neutral", "quote": "moved into a Dapper query", "excerpt": "This is not at all just an LLM thing. I've been working with C# and MS SQL Server for many years and never even considered this could be happening when I use Dapper. There's likely code I have deployed running suboptimally because of this. And it's not like I don't care about performance. If I see a small query taking more than a fraction of a second when testing in SSMS or If I see a larger query taking more than a ", "context": "works with C# and MS SQL Server for many years", "use_case": "C# database queries", "switched_from": "", "story": "C# Strings Silently Kill Your SQL Server Indexes in Dapper"}, {"id": 756524928, "item_id": 47282808, "url": "https://news.ycombinator.com/item?id=47282808", "by": "valiant55", "date": "2026-03-06", "version": null, "stance": "neutral", "quote": "", "excerpt": "There's a data type precedence that it uses to determine which value should be casted[0]. Nvarchar is higher precedence, therefore the varchar value is \"lifted\" to an nvarchar value first. This wouldn't be an issue if the types were reversed. 0: https://learn.microsoft.com/en-us/sql/t-sql/data-types/data-type-precedence-transact-sql?view=sql-server-ver17", "context": "", "use_case": "", "switched_from": "", "story": "C# Strings Silently Kill Your SQL Server Indexes in Dapper"}, {"id": 750803156, "item_id": 46925197, "url": "https://news.ycombinator.com/item?id=46925197", "by": "seabrookmx", "date": "2026-02-07", "version": null, "stance": "recommend", "quote": "using tools like Dapper", "excerpt": "In Instagram's case, they do not use the ORM or Admin, and have an internal fork of the request handling/middleware stack that is 100% async (before the recent async bits were added to Django)[1]. It's great that Django's API design allowed them to move this way easily, but they aren't actually using Django in the traditional sense because it can't handle their scale. I've found that with the Django ORM and DRF espec", "context": "", "use_case": "", "switched_from": "", "story": "France's homegrown open source online office suite"}, {"id": 741756256, "item_id": 46359766, "url": "https://news.ycombinator.com/item?id=46359766", "by": "morkalork", "date": "2025-12-22", "version": null, "stance": "recommend", "quote": "I worked at a company where we used Dapper with plain SQL.", "excerpt": "I worked at a company where we used Dapper with plain SQL. Like the sibling commenter said, simplicity. There were never [ORM] issues to debug and queries could easily be inspected.", "context": "", "use_case": "", "switched_from": "", "story": "The Rise of SQL:the second programming language everyone needs to know"}, {"id": 741589184, "item_id": 46349324, "url": "https://news.ycombinator.com/item?id=46349324", "by": "nostrademons", "date": "2025-12-21", "version": null, "stance": "recommend", "quote": "You can trace an individual request through every internal system", "excerpt": "Google solved most of these problems around 2005, with tools like LOG_EVERY_N (now part of absl [1]), Dapper [2], and several other tools that aren't public yet. You can trace an individual request through every internal system, view the request/response protobufs, every log that the server emitted, timing details, etc. More to the point, you can share this trace, which means that it's possible for one person to disc", "context": "", "use_case": "distributed request tracing", "switched_from": "", "story": "Logging sucks"}, {"id": 736885121, "item_id": 46055320, "url": "https://news.ycombinator.com/item?id=46055320", "by": "b0m", "date": "2025-11-26", "version": null, "stance": "warn", "quote": "it brings nothing to the table but strings and bunch of SQL", "excerpt": "We use newer Entity Framework (Core) in a few large projects with zero issues. Even have Dapper and moving away from it as it brings nothing to the table but strings and bunch of SQL.", "context": "", "use_case": "", "switched_from": "", "story": "Reinventing how .NET builds and ships (again)"}, {"id": 734622640, "item_id": 45913915, "url": "https://news.ycombinator.com/item?id=45913915", "by": "htgb", "date": "2025-11-13", "version": null, "stance": "compare", "quote": "But I wouldn't want to use it for the 99% where EF works well.", "excerpt": "Fair enough. We use Dapper for a handful of performance-critical queries. But I wouldn't want to use it for the 99% where EF works well. Just like I wouldn't want to hand-roll assembly more than where it's really needed. And it's not just about performance. LINQ plays well with the same static analysis tools as the rest of C#. You know, type checking, refactoring & co.", "context": "", "use_case": "Performance-critical queries", "switched_from": "", "story": ".NET 10"}, {"id": 732825440, "item_id": 45801590, "url": "https://news.ycombinator.com/item?id=45801590", "by": "tracker1", "date": "2025-11-03", "version": null, "stance": "recommend", "quote": "in C#/.Net I rely on Dapper", "excerpt": "I'm more a fan of just a sql template string handler... in C#/.Net I rely on Dapper... for node, I like being able to do things like... const results = await query` SELECT... FROM... WHERE x = ${varname} `; Note: This is not sql injection, the query is a string template handler that creates a parameterized query and returns the results asynchronously. There's adapters for most DBs, or it's easy enough to write one in", "context": "", "use_case": "SQL queries in C#", "switched_from": "", "story": "Why we migrated from Python to Node.js"}]}