![]() |
VOOZH | about |
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime --version 10.0.2
NuGet\Install-Package Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime -Version 10.0.2
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime" Version="10.0.2" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime" Version="10.0.2" />Directory.Packages.props
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime" />Project file
paket add Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime --version 10.0.2
#r "nuget: Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime, 10.0.2"
#:package Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime@10.0.2
#addin nuget:?package=Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime&version=10.0.2Install as a Cake Addin
#tool nuget:?package=Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime&version=10.0.2Install as a Cake Tool
Npgsql.EntityFrameworkCore.PostgreSQL is the open source EF Core provider for PostgreSQL. It allows you to interact with PostgreSQL via the most widely-used .NET O/RM from Microsoft, and use familiar LINQ syntax to express queries.
This package is a 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 plugin, simply add UseNodaTime as below and use NodaTime types in your entity properties:
await using var ctx = new BlogContext();
await ctx.Database.EnsureDeletedAsync();
await ctx.Database.EnsureCreatedAsync();
// Insert a Blog
ctx.Blogs.Add(new()
{
Name = "FooBlog",
CreationTime = SystemClock.Instance.GetCurrentInstant()
});
await ctx.SaveChangesAsync();
// Query all blogs created in 2020 or after
var newBlogs = await ctx.Blogs.Where(b => b.CreationTime >= Instant.FromUtc(2020, 1, 1, 0, 0, 0)).ToListAsync();
public class BlogContext : DbContext
{
public DbSet<Blog> Blogs { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder.UseNpgsql(
@"Host=myserver;Username=mylogin;Password=mypass;Database=mydatabase",
o => o.UseNodaTime());
}
public class Blog
{
public int Id { get; set; }
public string Name { get; set; }
public Instant CreationTime { get; set; }
}
The plugin also supports translating most NodaTime methods and properties into corresponding PostgreSQL date/time operations. For more information, see the NodaTime plugin documentation page.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. 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 is compatible. 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. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime:
| Package | Downloads |
|---|---|
|
devprime.stack.state
DevPrime State |
|
|
SvrdSdk.AspNetCore
Package Description |
|
|
EasyDesk.CleanArchitecture.Dal.PostgreSql
Utilities for the SqlServer data access layer of the clean architecture as seen by EasyDesk. |
|
|
CockroachDB.EFCore.Provider
Package Description |
|
|
LS.Helpers.Hosting
.NET Core helpers for ASP.NET hosting |
Showing the top 7 popular GitHub repositories that depend on Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime:
| Repository | Stars |
|---|---|
|
ChilliCream/graphql-platform
Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Nitro the awesome Monaco based GraphQL IDE.
|
|
|
linq2db/linq2db
Linq to database provider.
|
|
|
ErikEJ/EFCorePowerTools
Entity Framework Core Power Tools - reverse engineering, migrations and model visualization in Visual Studio & CLI
|
|
|
linq2db/linq2db.EntityFrameworkCore
Bring power of Linq To DB to Entity Framework Core projects
|
|
|
carlreid/StreamMaster
A powerful M3U proxy and stream management platform for Plex DVR, Emby, Jellyfin Live TV (and more)
|
|
|
NosCoreIO/NosCore
NosCore is a Nostale emulator in c# (.Net 10) using SuperSocket / Entity Framework / WebAPI / Autofac / Mapster / Serilog
|
|
|
RedpointGames/uet
UET (Unreal Engine Tool) makes building and testing Unreal Engine projects and plugins easy. It can distribute builds with BuildGraph, remotely execute automation tests on device and across multiple machines, handles fault tolerance and automatic retries and generally makes the whole experience of automating Unreal Engine a lot more pleasant.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0-preview.4 | 291 | 5/17/2026 |
| 11.0.0-preview.3 | 121 | 4/28/2026 |
| 11.0.0-preview.2 | 190 | 3/10/2026 |
| 11.0.0-preview.1 | 121 | 2/10/2026 |
| 10.0.2 | 80,739 | 5/27/2026 |
| 10.0.1 | 312,515 | 3/12/2026 |
| 10.0.0 | 518,876 | 11/22/2025 |
| 10.0.0-rc.2 | 6,886 | 10/16/2025 |
| 10.0.0-rc.1 | 2,338 | 9/10/2025 |
| 10.0.0-preview.7 | 1,118 | 8/17/2025 |
| 10.0.0-preview.5 | 1,785 | 6/11/2025 |
| 10.0.0-preview.3 | 585 | 4/12/2025 |
| 10.0.0-preview.2 | 522 | 3/24/2025 |
| 10.0.0-preview.1 | 217 | 3/1/2025 |
| 9.0.4 | 1,867,322 | 3/1/2025 |
| 9.0.3 | 262,654 | 1/17/2025 |
| 9.0.2 | 140,075 | 12/7/2024 |
| 9.0.1 | 91,593 | 11/19/2024 |
| 9.0.0 | 18,547 | 11/18/2024 |
| 8.0.11 | 718,311 | 11/18/2024 |