AdaskoTheBeAsT.Dapper.NodaTime 4.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package AdaskoTheBeAsT.Dapper.NodaTime --version 4.0.0                
NuGet\Install-Package AdaskoTheBeAsT.Dapper.NodaTime -Version 4.0.0                
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="AdaskoTheBeAsT.Dapper.NodaTime" Version="4.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AdaskoTheBeAsT.Dapper.NodaTime --version 4.0.0                
#r "nuget: AdaskoTheBeAsT.Dapper.NodaTime, 4.0.0"                
#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.
// Install AdaskoTheBeAsT.Dapper.NodaTime as a Cake Addin
#addin nuget:?package=AdaskoTheBeAsT.Dapper.NodaTime&version=4.0.0

// Install AdaskoTheBeAsT.Dapper.NodaTime as a Cake Tool
#tool nuget:?package=AdaskoTheBeAsT.Dapper.NodaTime&version=4.0.0                

AdaskoTheBeAsT.Dapper.NodaTime

Noda Time support for Dapper - unofficial fork of Dapper-NodaTime project which development stopped some time ago. Matt Johnson-Pint is original author and maintainer of Dapper-NodaTime project. This is continuation of his work. Refreshed for currently available .NET versions.

Badges

CodeFactor Build Status Azure DevOps tests Azure DevOps coverage Quality Gate Status Sonar Tests Sonar Test Count Sonar Test Execution Time Sonar Coverage Nuget NuGet Version

Installation

Install-Package AdaskoTheBeAsT.Dapper.NodaTime

In your project startup sequence somewhere, call:

DapperNodaTimeSetup.Register(<provider>);

Provider is one of the following date time zone providers:

  1. DateTimeZoneProviders.Tzdb - IANA Time Zone Database
  2. DateTimeZoneProviders.Bcl - Windows registry

That registers all of the type handlers. Alternatively, you can register each type handler separately if you wish. For example:

SqlMapper.AddTypeHandler(LocalDateTimeHandler.Default);

Work in progress. Currently supports the following types:

  • CalendarSystem - can be mapped to varchar(50)
  • DateTimeZone - can be mapped to varchar(50)
  • Duration - can be mapped to bigint
  • Instant - can be mapped to datetime, datetime2, datetimeoffset
  • LocalDate - can be mapped to date, datetime, datetime2
  • LocalDateTime - can be mapped to datetime, datetime2
  • LocalTime - can be mapped to time, datetime, datetime2
  • Offset - can be mapped to int
  • OffsetDateTime - can be mapped to datetimeoffset
  • Period - can be mapped to varchar(195) It is written as for example

Version 1 Max length of period is 195 characters (obsoleted). "Y:-2147483648 M:-2147483648 W:-2147483648 D:-2147483648 h:-9223372036854775808 m:-9223372036854775808 s:-9223372036854775808 ms:-9223372036854775808 t:-9223372036854775808 ns:-9223372036854775808"

Where:

  • Y - years
  • M - months
  • W - weeks
  • D - days
  • h - hours
  • m - minutes
  • s - seconds
  • ms - milliseconds
  • t - ticks
  • ns - nanoseconds

Version 2 uses Roundtrip format from NodaTime. Max length of period is 176 characters. "P-2147483648Y-2147483648M-2147483648W-2147483648DT-9223372036854775808H-9223372036854775808M-9223372036854775808S-9223372036854775808s-9223372036854775808t-9223372036854775808n"

Where:

  • P - start of period as in ISO8601
  • Y - years as in ISO8601
  • M - months as in ISO8601
  • W - weeks as in ISO8601
  • D - days as in ISO8601
  • T - date and time SEPARATOR as in ISO8601
  • H - hours as in ISO8601
  • M - minutes as in ISO8601
  • S - seconds as in ISO8601
  • s - milliseconds
  • t - ticks
  • n - nanoseconds

Does not support:

  • ZonedDateTime (although there is trick to keep properties separated and then by using mapping code or AutoMapper (or other mapper) compose ZoneDateTime from LocalDateTime, CalendarSystem and DateTimeZone)
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on AdaskoTheBeAsT.Dapper.NodaTime:

Package Downloads
Mattias1.SqlQueryBuilder.Core

A lightweight querybuilder, using Dapper internally.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
4.0.2 4,777 5/27/2024
4.0.0 870 11/30/2023
2.0.0 440 7/16/2023
1.0.3 6,665 5/4/2023
1.0.1 11,024 11/20/2022
1.0.0 220 11/20/2022