YuckQi.Data.Sql.Dapper
10.4.1
dotnet add package YuckQi.Data.Sql.Dapper --version 10.4.1
NuGet\Install-Package YuckQi.Data.Sql.Dapper -Version 10.4.1
<PackageReference Include="YuckQi.Data.Sql.Dapper" Version="10.4.1" />
<PackageVersion Include="YuckQi.Data.Sql.Dapper" Version="10.4.1" />
<PackageReference Include="YuckQi.Data.Sql.Dapper" />
paket add YuckQi.Data.Sql.Dapper --version 10.4.1
#r "nuget: YuckQi.Data.Sql.Dapper, 10.4.1"
#:package YuckQi.Data.Sql.Dapper@10.4.1
#addin nuget:?package=YuckQi.Data.Sql.Dapper&version=10.4.1
#tool nuget:?package=YuckQi.Data.Sql.Dapper&version=10.4.1
YuckQi.Data.Sql.Dapper
An implementation of YuckQi.Data for SQL databases using Dapper and SimpleCRUD. Serves as the base layer for database-specific Dapper implementations.
Key Types
Provides handler implementations that operate over an IDbTransaction scope:
CreationHandler– inserts records viaSimpleCRUD.InsertRevisionHandler– updates records viaSimpleCRUD.UpdatePhysicalDeletionHandler– deletes records viaSimpleCRUD.DeleteRetrievalHandlerBase– abstract base for retrieval withISqlGenerator-driven queriesSearchHandlerBase– abstract base for paginated search withISqlGenerator-driven queriesISqlGenerator– interface for generating provider-specific SQL (implemented by database-specific packages)FilterCriteriaExtensions– builds DapperDynamicParametersfromFilterCriteria;Containsvalues are wrapped as%value%with%,_, and\escaped so they are literal. SQL Server'sSqlGeneratoralso treats[as literal (aLIKEcharacter-class wildcard on that dialect only)
Database-specific packages (MySql, Oracle, PostgreSql, SqlServer) provide concrete ISqlGenerator implementations and ready-to-use retrieval/search handlers.
DateOnly and TimeOnly Properties
SimpleCRUD only generates insert/update columns for the types on its built-in "simple type" list, which leaves out DateOnly and TimeOnly. CreationHandler and RevisionHandler add those columns (including the nullable forms), so you don't need [Editable(true)] on them. The added columns follow SimpleCRUD's usual attribute rules: [Column], [Key], [Required], [IgnoreInsert], [IgnoreUpdate], [NotMapped], [ReadOnly] and [Editable] work the same as they do for a DateTime property. If another property already maps to the same column name, the column is written once, from that other property.
The handlers do this by updating the column lists SimpleCRUD caches for each record type. They check those cached lists, and any cached UPDATE statement, on every write and restore the added columns if SimpleCRUD has rebuilt them, so you can still call SimpleCRUD's Insert/Update directly on the same record types elsewhere. A direct SimpleCRUD call writes only the columns SimpleCRUD itself knows about. A direct call made at the same moment a handler is restoring the cache can also leave that one handler statement without the added columns.
Upgrading: you can remove [Editable(true)] attributes that were only there for DateOnly/TimeOnly columns. These values now go to Dapper as parameters, so Dapper must be able to bind them. If your Dapper version or database provider can't, register an SqlMapper.TypeHandler<DateOnly> and SqlMapper.TypeHandler<TimeOnly>. Without one, the write fails with an error instead of writing NULL.
This works by reading private members of Dapper.SimpleCRUD (tested against 2.3.0), and only for record types that have DateOnly/TimeOnly properties. If a future SimpleCRUD version removes those members or changes GetColumnName's signature, the write throws an InvalidOperationException that names the member.
Dependencies
Installation
dotnet add package YuckQi.Data.Sql.Dapper
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Dapper.SimpleCRUD (>= 2.3.0)
- YuckQi.Data (>= 10.4.1)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on YuckQi.Data.Sql.Dapper:
| Package | Downloads |
|---|---|
|
YuckQi.Data.Sql.Dapper.SqlServer
An implementation of YuckQi.Data for MSSQL databases using Dapper and SimpleCRUD. |
|
|
YuckQi.Data.Sql.Dapper.MySql
An implementation of YuckQi.Data for MySQL databases using Dapper and SimpleCRUD. |
|
|
YuckQi.Data.Sql.Dapper.Oracle
An implementation of YuckQi.Data for Oracle databases using Dapper and SimpleCRUD. |
|
|
YuckQi.Data.Sql.Dapper.PostgreSql
An implementation of YuckQi.Data for PostgreSQL databases using Dapper and SimpleCRUD. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.4.1 | 51 | 11/25/2026 |
| 10.4.0 | 308 | 11/3/2026 |
| 10.3.0 | 521 | 9/17/2026 |
| 10.2.0 | 157 | 9/16/2026 |
| 10.1.1 | 192 | 9/11/2026 |
| 10.1.0 | 247 | 8/26/2026 |
| 10.0.2 | 212 | 7/24/2026 |
| 10.0.1 | 197 | 7/23/2026 |
| 10.0.0 | 198 | 7/23/2026 |
| 8.7.0 | 229 | 7/22/2026 |
| 8.6.0 | 251 | 7/1/2026 |
| 8.5.1 | 239 | 3/18/2026 |
| 8.5.0 | 216 | 3/17/2026 |
| 8.4.0 | 217 | 3/10/2026 |
| 8.3.2 | 216 | 3/9/2026 |
| 8.3.1 | 219 | 3/9/2026 |
| 8.3.0 | 221 | 3/9/2026 |
| 8.2.0 | 250 | 2/1/2026 |
| 8.1.0 | 233 | 1/31/2026 |
| 8.0.0 | 242 | 1/30/2026 |