AdaskoTheBeAsT.Dapper.NodaTime.Oracle
6.0.0
dotnet add package AdaskoTheBeAsT.Dapper.NodaTime.Oracle --version 6.0.0
NuGet\Install-Package AdaskoTheBeAsT.Dapper.NodaTime.Oracle -Version 6.0.0
<PackageReference Include="AdaskoTheBeAsT.Dapper.NodaTime.Oracle" Version="6.0.0" />
<PackageVersion Include="AdaskoTheBeAsT.Dapper.NodaTime.Oracle" Version="6.0.0" />
<PackageReference Include="AdaskoTheBeAsT.Dapper.NodaTime.Oracle" />
paket add AdaskoTheBeAsT.Dapper.NodaTime.Oracle --version 6.0.0
#r "nuget: AdaskoTheBeAsT.Dapper.NodaTime.Oracle, 6.0.0"
#:package AdaskoTheBeAsT.Dapper.NodaTime.Oracle@6.0.0
#addin nuget:?package=AdaskoTheBeAsT.Dapper.NodaTime.Oracle&version=6.0.0
#tool nuget:?package=AdaskoTheBeAsT.Dapper.NodaTime.Oracle&version=6.0.0
AdaskoTheBeAsT.Dapper.NodaTime.Oracle
Oracle dialect for AdaskoTheBeAsT.Dapper.NodaTime.
It registers the NodaTime type handlers and shapes every parameter with the matching OracleDbType.
Provider client: Oracle.ManagedDataAccess.Core on .NET 8+, Oracle.ManagedDataAccess on .NET Framework.
Installation
dotnet add package AdaskoTheBeAsT.Dapper.NodaTime.Oracle
Usage
using AdaskoTheBeAsT.Dapper.NodaTime.Oracle;
using NodaTime;
OracleDapperNodaTimeSetup.Register(DateTimeZoneProviders.Tzdb);
Call it once during startup. The dialect is public as OracleNodaTimeConfiguration if you want to pass it to
DapperNodaTimeSetup.Register yourself.
Parameter mapping
| NodaTime type | Value written | OracleDbType |
Recommended column |
|---|---|---|---|
Instant |
DateTime (UTC) |
TimeStamp |
TIMESTAMP |
LocalDate |
DateTime at midnight |
Date |
DATE |
LocalDateTime |
DateTime (unspecified) |
TimeStamp |
TIMESTAMP |
LocalTime |
TimeSpan since midnight |
IntervalDS |
INTERVAL DAY TO SECOND |
OffsetDateTime |
DateTimeOffset |
TimeStampTZ |
TIMESTAMP WITH TIME ZONE |
Offset |
int seconds |
Int32 |
NUMBER(10) |
Duration |
long nanoseconds |
Int64 |
NUMBER(19) |
Period |
ISO8601 roundtrip string | Varchar2 |
VARCHAR2(176) |
CalendarSystem |
calendar id | Varchar2 |
VARCHAR2(50) |
DateTimeZone |
time zone id | Varchar2 |
VARCHAR2(50) |
Oracle specifics worth knowing:
- Oracle has no time-only type, so
LocalTimeis written as anINTERVAL DAY TO SECONDand read back from the returnedTimeSpan. - Oracle
DATEcarries a time component;LocalDateis written at midnight and only the date part is used. TIMESTAMP WITH TIME ZONEpreserves the offset, soOffsetDateTimeround-trips without normalization.- Numeric values arrive as
decimalfrom the provider;OffsetandDurationhandlers accept that.
Recommended schema
CREATE TABLE Events (
Id NUMBER(19) PRIMARY KEY,
CreatedAt TIMESTAMP NOT NULL, -- Instant (UTC)
ScheduledAt TIMESTAMP NOT NULL, -- LocalDateTime
EventDate DATE NOT NULL, -- LocalDate
StartTime INTERVAL DAY TO SECOND NOT NULL, -- LocalTime
StartsAtWithOffset TIMESTAMP WITH TIME ZONE NULL, -- OffsetDateTime
UtcOffsetSeconds NUMBER(10) NULL, -- Offset
RunTimeNanoseconds NUMBER(19) NULL, -- Duration
Recurrence VARCHAR2(176) NULL, -- Period
Calendar VARCHAR2(50) NULL, -- CalendarSystem
TimeZone VARCHAR2(50) NULL) -- DateTimeZone
Example
using Dapper;
using NodaTime;
using Oracle.ManagedDataAccess.Client;
using var connection = new OracleConnection(connectionString);
await connection.ExecuteAsync(
"INSERT INTO Events (Id, CreatedAt, StartTime) VALUES (:Id, :CreatedAt, :StartTime)",
new
{
Id = 1L,
CreatedAt = SystemClock.Instance.GetCurrentInstant(),
StartTime = new LocalTime(10, 0),
});
Oracle uses : for bind parameters; keep BindByName in mind when a command has several parameters.
Target frameworks
net10.0, net9.0, net8.0, net481, net48, net472.
Links
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
| .NET Framework | net472 is compatible. net48 is compatible. net481 is compatible. |
-
.NETFramework 4.7.2
- AdaskoTheBeAsT.Dapper.NodaTime (>= 6.0.0)
- Oracle.ManagedDataAccess (>= 23.26.300 && < 24.0.0)
- System.Text.Json (>= 10.0.10 && < 11.0.0)
-
.NETFramework 4.8
- AdaskoTheBeAsT.Dapper.NodaTime (>= 6.0.0)
- Oracle.ManagedDataAccess (>= 23.26.300 && < 24.0.0)
- System.Text.Json (>= 10.0.10 && < 11.0.0)
-
.NETFramework 4.8.1
- AdaskoTheBeAsT.Dapper.NodaTime (>= 6.0.0)
- Oracle.ManagedDataAccess (>= 23.26.300 && < 24.0.0)
- System.Text.Json (>= 10.0.10 && < 11.0.0)
-
net10.0
- AdaskoTheBeAsT.Dapper.NodaTime (>= 6.0.0)
- Oracle.ManagedDataAccess.Core (>= 23.26.300 && < 24.0.0)
-
net8.0
- AdaskoTheBeAsT.Dapper.NodaTime (>= 6.0.0)
- Oracle.ManagedDataAccess.Core (>= 23.26.300 && < 24.0.0)
-
net9.0
- AdaskoTheBeAsT.Dapper.NodaTime (>= 6.0.0)
- Oracle.ManagedDataAccess.Core (>= 23.26.300 && < 24.0.0)
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 |
|---|---|---|
| 6.0.0 | 37 | 7/29/2026 |