AdaskoTheBeAsT.Dapper.NodaTime
4.0.2
dotnet add package AdaskoTheBeAsT.Dapper.NodaTime --version 4.0.2
NuGet\Install-Package AdaskoTheBeAsT.Dapper.NodaTime -Version 4.0.2
<PackageReference Include="AdaskoTheBeAsT.Dapper.NodaTime" Version="4.0.2" />
paket add AdaskoTheBeAsT.Dapper.NodaTime --version 4.0.2
#r "nuget: AdaskoTheBeAsT.Dapper.NodaTime, 4.0.2"
// Install AdaskoTheBeAsT.Dapper.NodaTime as a Cake Addin #addin nuget:?package=AdaskoTheBeAsT.Dapper.NodaTime&version=4.0.2 // Install AdaskoTheBeAsT.Dapper.NodaTime as a Cake Tool #tool nuget:?package=AdaskoTheBeAsT.Dapper.NodaTime&version=4.0.2
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
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:
- DateTimeZoneProviders.Tzdb - IANA Time Zone Database
- 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 | Versions 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. |
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.