Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime 7.0.4

Npgsql Entity Framework Core provider for PostgreSQL

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.

No packages depend on Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime.

Version Downloads Last updated
10.0.0 2 11/27/2025
10.0.0-rc.2 4 10/19/2025
10.0.0-rc.1 3 09/15/2025
10.0.0-preview.7 5 08/31/2025
10.0.0-preview.5 4 06/28/2025
10.0.0-preview.3 5 06/07/2025
10.0.0-preview.2 5 06/07/2025
10.0.0-preview.1 6 03/09/2025
9.0.4 8 03/09/2025
9.0.3 6 01/31/2025
9.0.2 6 01/31/2025
9.0.1 6 01/31/2025
9.0.0 6 01/31/2025
9.0.0-rc.2 7 01/31/2025
9.0.0-rc.1 6 01/31/2025
9.0.0-preview.7 6 01/31/2025
9.0.0-preview.3 6 01/31/2025
9.0.0-preview.2 6 01/31/2025
9.0.0-preview.1 6 01/31/2025
8.0.11 7 01/31/2025
8.0.10 6 01/31/2025
8.0.8 6 01/31/2025
8.0.4 6 01/31/2025
8.0.2 6 02/26/2025
8.0.0 6 01/31/2025
8.0.0-rc.2 6 01/31/2025
8.0.0-rc.1 10 01/31/2025
8.0.0-preview.7 6 01/31/2025
8.0.0-preview.4 6 01/31/2025
8.0.0-preview.3 5 01/31/2025
8.0.0-preview.2 6 01/31/2025
8.0.0-preview.1 7 01/31/2025
7.0.18 6 01/31/2025
7.0.11 6 01/31/2025
7.0.4 7 01/20/2025
7.0.3 6 02/26/2025
7.0.1 6 01/31/2025
7.0.0 6 01/31/2025
7.0.0-rc.2 6 01/31/2025
7.0.0-rc.1 6 02/26/2025
7.0.0-preview.7 6 01/31/2025
7.0.0-preview.6 6 01/31/2025
7.0.0-preview.5 6 01/31/2025
7.0.0-preview.4 6 01/31/2025
7.0.0-preview.3 7 01/31/2025
7.0.0-preview.2 6 01/31/2025
7.0.0-preview.1 6 01/31/2025
6.0.29 6 01/31/2025
6.0.22 6 01/31/2025
6.0.8 6 01/31/2025
6.0.7 6 01/31/2025
6.0.6 7 01/31/2025
6.0.5 6 01/31/2025
6.0.4 5 03/09/2025
6.0.3 6 01/31/2025
6.0.2 6 01/31/2025
6.0.1 6 01/31/2025
6.0.0 6 01/31/2025
6.0.0-rc.2 6 01/31/2025
6.0.0-rc.1 5 03/09/2025
6.0.0-preview7 7 01/31/2025
6.0.0-preview6 6 02/26/2025
6.0.0-preview5 6 01/31/2025
6.0.0-preview4 7 01/31/2025
6.0.0-preview3 6 01/31/2025
6.0.0-preview2 6 01/31/2025
6.0.0-preview1 6 01/31/2025
5.0.10 6 01/31/2025
5.0.7 6 01/31/2025
5.0.6 6 01/31/2025
5.0.5.1 6 01/31/2025
5.0.5 6 01/31/2025
5.0.2 7 01/31/2025
5.0.1 6 01/31/2025
5.0.0 6 01/31/2025
5.0.0-rc2 6 01/31/2025
5.0.0-rc1 7 01/31/2025
5.0.0-preview8 6 01/31/2025
5.0.0-preview7 6 01/31/2025
5.0.0-preview6 6 01/31/2025
5.0.0-preview5 6 01/31/2025
5.0.0-preview4 6 01/31/2025
5.0.0-preview3 6 01/31/2025
5.0.0-preview2 6 01/31/2025
5.0.0-preview.2.20120.8 9 01/31/2025
3.1.18 6 01/31/2025
3.1.11 7 01/31/2025
3.1.4 7 01/31/2025
3.1.3 6 01/31/2025
3.1.2 6 01/31/2025
3.1.1 6 01/31/2025
3.1.0 6 01/31/2025
3.1.0-preview3 6 01/31/2025
3.1.0-preview2 6 01/31/2025
3.0.1 6 02/26/2025
3.0.0 6 01/31/2025
3.0.0-preview9 6 01/31/2025
3.0.0-preview8 7 01/31/2025
3.0.0-preview7 7 01/31/2025
3.0.0-preview5 6 01/31/2025
3.0.0-preview4 6 01/31/2025
3.0.0-preview3 6 01/31/2025
3.0.0-preview1 6 01/31/2025
2.2.4 6 01/31/2025
2.2.0 6 01/31/2025
2.1.1 6 01/31/2025
2.1.0 6 01/31/2025
2.1.0-rc1 6 02/26/2025