Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime 7.0.18

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
11.0.0-rc.3 7 10/28/2026
11.0.0-rc.2 7 10/22/2026
11.0.0-rc.1.1 6 10/22/2026
11.0.0-rc.1 6 10/22/2026
11.0.0-preview.6 7 10/22/2026
11.0.0-preview.5 7 10/22/2026
11.0.0-preview.4 6 10/22/2026
11.0.0-preview.3 7 10/22/2026
11.0.0-preview.2 6 10/22/2026
11.0.0-preview.1 6 10/22/2026
10.0.3 12 10/21/2026
10.0.2 6 10/22/2026
10.0.1 7 10/22/2026
10.0.0 8 10/22/2026
10.0.0-rc.2 8 10/22/2026
10.0.0-rc.1 7 10/22/2026
10.0.0-preview.7 7 10/22/2026
10.0.0-preview.5 7 10/22/2026
10.0.0-preview.3 6 10/22/2026
10.0.0-preview.2 7 10/22/2026
10.0.0-preview.1 7 10/22/2026
9.0.4 7 10/22/2026
9.0.3 6 10/22/2026
9.0.2 6 10/22/2026
9.0.1 6 10/25/2026
9.0.0 7 10/22/2026
9.0.0-rc.2 6 10/22/2026
9.0.0-rc.1 7 10/22/2026
9.0.0-preview.7 6 10/22/2026
9.0.0-preview.3 6 10/22/2026
9.0.0-preview.2 7 10/22/2026
9.0.0-preview.1 8 10/22/2026
8.0.11 7 10/22/2026
8.0.10 7 10/22/2026
8.0.8 6 10/22/2026
8.0.4 6 10/22/2026
8.0.2 7 10/22/2026
8.0.0 6 10/22/2026
8.0.0-rc.2 6 10/22/2026
8.0.0-rc.1 7 10/22/2026
8.0.0-preview.7 7 10/22/2026
8.0.0-preview.4 6 10/22/2026
8.0.0-preview.3 6 10/22/2026
8.0.0-preview.2 6 10/22/2026
8.0.0-preview.1 6 10/22/2026
7.0.18 7 10/22/2026
7.0.11 7 10/22/2026
7.0.4 7 10/22/2026
7.0.3 8 10/22/2026
7.0.1 7 10/22/2026
7.0.0 6 10/22/2026
7.0.0-rc.2 6 10/22/2026
7.0.0-rc.1 6 10/22/2026
7.0.0-preview.7 6 10/22/2026
7.0.0-preview.6 7 10/22/2026
7.0.0-preview.5 6 10/22/2026
7.0.0-preview.4 6 10/22/2026
7.0.0-preview.3 7 10/22/2026
7.0.0-preview.2 7 10/22/2026
7.0.0-preview.1 10 10/22/2026
6.0.29 7 10/22/2026
6.0.22 6 10/22/2026
6.0.8 5 10/22/2026
6.0.7 9 10/22/2026
6.0.6 6 10/22/2026
6.0.5 7 10/22/2026
6.0.4 6 10/22/2026
6.0.3 7 10/22/2026
6.0.2 7 10/22/2026
6.0.1 6 10/22/2026
6.0.0 6 10/22/2026
6.0.0-rc.2 7 10/22/2026
6.0.0-rc.1 6 10/22/2026
6.0.0-preview7 6 10/22/2026
6.0.0-preview6 7 10/22/2026
6.0.0-preview5 6 10/22/2026
6.0.0-preview4 6 10/22/2026
6.0.0-preview3 6 10/22/2026
6.0.0-preview2 8 10/22/2026
6.0.0-preview1 8 10/22/2026
5.0.10 7 10/22/2026
5.0.7 8 10/22/2026
5.0.6 6 10/22/2026
5.0.5.1 7 10/22/2026
5.0.5 6 10/25/2026
5.0.2 5 10/22/2026
5.0.1 7 10/22/2026
5.0.0 7 10/22/2026
5.0.0-rc2 7 10/22/2026
5.0.0-rc1 6 10/22/2026
5.0.0-preview8 7 10/22/2026
5.0.0-preview7 6 10/22/2026
5.0.0-preview6 7 10/22/2026
5.0.0-preview5 6 10/22/2026
5.0.0-preview4 6 10/22/2026
5.0.0-preview3 7 10/22/2026
5.0.0-preview2 7 10/22/2026
5.0.0-preview.2.20120.8 7 10/22/2026
3.1.18 6 10/22/2026
3.1.11 8 10/22/2026
3.1.4 7 10/22/2026
3.1.3 7 10/22/2026
3.1.2 6 10/22/2026
3.1.1 7 10/22/2026
3.1.0 6 10/22/2026
3.1.0-preview3 7 10/22/2026
3.1.0-preview2 6 10/22/2026
3.0.1 7 10/22/2026
3.0.0 7 10/22/2026
3.0.0-preview9 7 10/22/2026
3.0.0-preview8 6 10/22/2026
3.0.0-preview7 6 10/22/2026
3.0.0-preview5 7 10/22/2026
3.0.0-preview4 6 10/22/2026
3.0.0-preview3 6 10/22/2026
3.0.0-preview1 7 10/22/2026
2.2.4 6 10/22/2026
2.2.0 7 10/22/2026
2.1.1 6 10/22/2026
2.1.0 7 10/22/2026
2.1.0-rc1 7 10/22/2026