![]() |
VOOZH | about |
dotnet add package Npgsql.NodaTime --version 10.0.3
NuGet\Install-Package Npgsql.NodaTime -Version 10.0.3
<PackageReference Include="Npgsql.NodaTime" Version="10.0.3" />
<PackageVersion Include="Npgsql.NodaTime" Version="10.0.3" />Directory.Packages.props
<PackageReference Include="Npgsql.NodaTime" />Project file
paket add Npgsql.NodaTime --version 10.0.3
#r "nuget: Npgsql.NodaTime, 10.0.3"
#:package Npgsql.NodaTime@10.0.3
#addin nuget:?package=Npgsql.NodaTime&version=10.0.3Install as a Cake Addin
#tool nuget:?package=Npgsql.NodaTime&version=10.0.3Install as a Cake Tool
Npgsql is the open source .NET data provider for PostgreSQL. It allows you to connect and interact with PostgreSQL server using .NET.
This package is an Npgsql plugin which allows you to use the NodaTime date/time library when interacting with PostgreSQL; this provides a better and safer API for dealing with date and time data.
To use the NodaTime plugin, add a dependency on this package and create a NpgsqlDataSource. Once this is done, you can use NodaTime types when interacting with PostgreSQL, just as you would use e.g. DateTime:
using Npgsql;
var dataSourceBuilder = new NpgsqlDataSourceBuilder(ConnectionString);
dataSourceBuilder.UseNodaTime();
var dataSource = dataSourceBuilder.Build();
var conn = await dataSource.OpenConnectionAsync();
// Write NodaTime Instant to PostgreSQL "timestamp with time zone" (UTC)
using (var cmd = new NpgsqlCommand(@"INSERT INTO mytable (my_timestamptz) VALUES (@p)", conn))
{
cmd.Parameters.Add(new NpgsqlParameter("p", Instant.FromUtc(2011, 1, 1, 10, 30)));
cmd.ExecuteNonQuery();
}
// Read timestamp back from the database as an Instant
using (var cmd = new NpgsqlCommand(@"SELECT my_timestamptz FROM mytable", conn))
using (var reader = cmd.ExecuteReader())
{
reader.Read();
var instant = reader.GetFieldValue<Instant>(0);
}
For more information, visit the NodaTime plugin documentation page.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 5 NuGet packages that depend on Npgsql.NodaTime:
| Package | Downloads |
|---|---|
|
Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime
NodaTime support plugin for PostgreSQL/Npgsql Entity Framework Core provider. |
|
|
Marten.NodaTime
NodaTime extension for Marten |
|
|
PostgreSQLCopyHelper.NodaTime
A library for Bulk Copy / Bulk Inserts with PostgreSQL. |
|
|
Rocket.Surgery.Extensions.Marten
Package Description |
|
|
Lobster.Boot
LobsterBoot核心类库 |
Showing the top 5 popular GitHub repositories that depend on Npgsql.NodaTime:
| Repository | Stars |
|---|---|
|
JasperFx/marten
.NET Transactional Document DB and Event Store on PostgreSQL
|
|
|
linq2db/linq2db
Linq to database provider.
|
|
|
npgsql/efcore.pg
Entity Framework Core provider for PostgreSQL
|
|
| PluralKit/PluralKit | |
|
NosCoreIO/NosCore
NosCore is a Nostale emulator in c# (.Net 10) using SuperSocket / Entity Framework / WebAPI / Autofac / Mapster / Serilog
|
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.3 | 105,407 | 5/27/2026 |
| 10.0.2 | 466,606 | 3/12/2026 |
| 10.0.1 | 228,994 | 12/19/2025 |
| 10.0.0 | 575,711 | 11/22/2025 |
| 10.0.0-rc.1 | 7,896 | 10/5/2025 |
| 9.0.5 | 3,711 | 3/12/2026 |
| 9.0.4 | 281,664 | 10/5/2025 |
| 9.0.3 | 2,174,476 | 2/24/2025 |
| 9.0.2 | 698,145 | 12/7/2024 |
| 9.0.1 | 180,917 | 11/19/2024 |
| 9.0.0 | 92,791 | 11/18/2024 |
| 8.0.9 | 20,392 | 3/12/2026 |
| 8.0.8 | 109,443 | 10/5/2025 |
| 8.0.7 | 229,320 | 2/24/2025 |
| 8.0.6 | 949,111 | 11/18/2024 |
| 8.0.5 | 614,151 | 10/13/2024 |
| 7.0.10 | 77,686 | 3/17/2025 |
| 7.0.9 | 85,801 | 11/18/2024 |
| 6.0.13 | 108,626 | 11/18/2024 |
| 6.0.12 | 79,102 | 9/10/2024 |