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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="YuckQi.Data.Sql.Dapper" Version="10.4.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="YuckQi.Data.Sql.Dapper" Version="10.4.1" />
                    
Directory.Packages.props
<PackageReference Include="YuckQi.Data.Sql.Dapper" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add YuckQi.Data.Sql.Dapper --version 10.4.1
                    
#r "nuget: YuckQi.Data.Sql.Dapper, 10.4.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package YuckQi.Data.Sql.Dapper@10.4.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=YuckQi.Data.Sql.Dapper&version=10.4.1
                    
Install as a Cake Addin
#tool nuget:?package=YuckQi.Data.Sql.Dapper&version=10.4.1
                    
Install as a Cake Tool

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 via SimpleCRUD.Insert
  • RevisionHandler – updates records via SimpleCRUD.Update
  • PhysicalDeletionHandler – deletes records via SimpleCRUD.Delete
  • RetrievalHandlerBase – abstract base for retrieval with ISqlGenerator-driven queries
  • SearchHandlerBase – abstract base for paginated search with ISqlGenerator-driven queries
  • ISqlGenerator – interface for generating provider-specific SQL (implemented by database-specific packages)
  • FilterCriteriaExtensions – builds Dapper DynamicParameters from FilterCriteria; Contains values are wrapped as %value% with %, _, and \ escaped so they are literal. SQL Server's SqlGenerator also treats [ as literal (a LIKE character-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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed