Scaidome.Dapper 1.2.2

dotnet add package Scaidome.Dapper --version 1.2.2
                    
NuGet\Install-Package Scaidome.Dapper -Version 1.2.2
                    
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="Scaidome.Dapper" Version="1.2.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Scaidome.Dapper" Version="1.2.2" />
                    
Directory.Packages.props
<PackageReference Include="Scaidome.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 Scaidome.Dapper --version 1.2.2
                    
#r "nuget: Scaidome.Dapper, 1.2.2"
                    
#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 Scaidome.Dapper@1.2.2
                    
#: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=Scaidome.Dapper&version=1.2.2
                    
Install as a Cake Addin
#tool nuget:?package=Scaidome.Dapper&version=1.2.2
                    
Install as a Cake Tool

Scaidome.Dapper

Dapper reading rules for the SQLite stores: how an identity and a time held as text are read back. Depends on Dapper. Namespace: Scaidome.Dapper.

Usage

Call this once, before the first SQLite connection is opened:

SqliteValueTypes.Register();

Dapper keeps its type handlers per process, so the rules apply to every SQLite store in the process. Every part that opens a store registers them before its first connection. This way the rules are in place whichever part opens a store first. Registering again changes nothing, and registration clears Dapper's query cache: a reader compiled before the handlers existed would otherwise keep reading without them.

Identities

IdentityTypeHandler reads a Guid that SQLite holds as text, in any case. It also accepts a Guid or a 16-byte blob. Text that is not an identity throws a DataException instead of yielding an empty identity, because a silently empty identity would point a row at nothing.

Times

TimeTypeHandler reads a DateTime held as text, always as UTC and whatever the machine's culture.

  • It accepts the driver's own form: date, a space, then the time with up to seven fractional digits and no zone. It also accepts the ISO forms with T, with or without fractions or a trailing Z, which is what hand-written rows and other tools leave behind.
  • Any other text that reads as a date and time is read as UTC too; text with an offset is converted using that offset.
  • A value with no zone is taken to be UTC. A local value is converted.
  • Text that is not a time throws a DataException.

TimeTypeHandler.Format writes a time in the rules' own form, yyyy-MM-ddTHH:mm:ss.fffZ, in the invariant culture.

Writing parameters

Both handlers only read. When writing, the parameter keeps the Guid or DateTime itself, so the database driver binds it in its own form, which is the form every store holds.

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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.2 96 10/6/2026
1.2.1 99 10/3/2026
1.2.0 97 10/2/2026
1.1.1 94 9/30/2026
1.1.0 101 9/30/2026