Npgsql.EntityFrameworkCore.PostgreSQL 10.0.0

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. It's built on top of Npgsql.

The provider looks and feels just like any other Entity Framework Core provider. Here's a quick sample to get you started:

await using var ctx = new BlogContext();
await ctx.Database.EnsureDeletedAsync();
await ctx.Database.EnsureCreatedAsync();

// Insert a Blog
ctx.Blogs.Add(new() { Name = "FooBlog" });
await ctx.SaveChangesAsync();

// Query all blogs who's name starts with F
var fBlogs = await ctx.Blogs.Where(b => b.Name.StartsWith("F")).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");
}

public class Blog
{
    public int Id { get; set; }
    public string Name { get; set; }
}

Aside from providing general EF Core support for PostgreSQL, the provider also exposes some PostgreSQL-specific capabilities, allowing you to query JSON, array or range columns, as well as many other advanced features. For more information, see the the Npgsql site. For information about EF Core in general, see the EF Core website.

No packages depend on Npgsql.EntityFrameworkCore.PostgreSQL.

.NET 10.0

Version Downloads Last updated
10.0.0 49 11/23/2025
10.0.0-rc.2 42 10/17/2025
10.0.0-rc.1 49 09/10/2025
10.0.0-preview.7 61 08/18/2025
10.0.0-preview.5 60 06/13/2025
10.0.0-preview.3 73 04/13/2025
10.0.0-preview.2 79 03/31/2025
10.0.0-preview.1 80 03/31/2025
9.0.4 605 03/15/2025
9.0.3 224 02/11/2025
9.0.2 95 12/22/2024
9.0.1 79 11/19/2024
9.0.0 84 11/19/2024
9.0.0-rc.2 82 10/21/2024
9.0.0-rc.1 92 09/19/2024
9.0.0-preview.7 80 09/19/2024
9.0.0-preview.3 96 07/19/2024
9.0.0-preview.2 107 07/19/2024
9.0.0-preview.1 125 07/19/2024
8.0.11 81 11/19/2024
8.0.10 238 10/22/2024
8.0.8 212 10/15/2024
8.0.4 372 06/27/2024
8.0.2 85 07/19/2024
8.0.0 390 02/04/2024
8.0.0-rc.2 104 07/19/2024
8.0.0-rc.1 111 07/19/2024
8.0.0-preview.7 103 07/19/2024
8.0.0-preview.4 117 07/19/2024
8.0.0-preview.3 114 07/19/2024
8.0.0-preview.2 80 07/19/2024
8.0.0-preview.1 119 07/19/2024
7.0.18 102 07/19/2024
7.0.11 105 07/19/2024
7.0.4 115 07/19/2024
7.0.3 171 02/04/2024
7.0.1 107 07/19/2024
7.0.0 114 02/04/2024
7.0.0-rc.2 120 07/19/2024
7.0.0-rc.1 102 07/19/2024
7.0.0-preview.7 103 07/19/2024
7.0.0-preview.6 95 07/19/2024
7.0.0-preview.5 107 07/19/2024
7.0.0-preview.4 92 07/19/2024
7.0.0-preview.3 95 07/19/2024
7.0.0-preview.2 100 07/19/2024
7.0.0-preview.1 100 07/19/2024
6.0.29 98 07/19/2024
6.0.22 117 07/19/2024
6.0.8 99 07/19/2024
6.0.7 107 07/19/2024
6.0.6 106 07/19/2024
6.0.5 110 07/19/2024
6.0.4 131 02/09/2024
6.0.3 155 02/04/2024
6.0.2 121 07/19/2024
6.0.1 120 07/19/2024
6.0.0 97 07/17/2024
6.0.0-rc.2 100 07/19/2024
6.0.0-rc.1 115 07/19/2024
6.0.0-preview7 111 07/19/2024
6.0.0-preview6 107 07/19/2024
6.0.0-preview5 99 07/19/2024
6.0.0-preview4 94 07/19/2024
6.0.0-preview3 111 07/19/2024
6.0.0-preview2 96 07/19/2024
6.0.0-preview1 96 07/19/2024
5.0.10 110 07/19/2024
5.0.7 100 07/19/2024
5.0.6 100 07/19/2024
5.0.5.1 92 07/19/2024
5.0.5 100 07/19/2024
5.0.2 108 07/19/2024
5.0.1 112 07/19/2024
5.0.0 108 07/19/2024
3.1.18 98 07/19/2024
3.1.11 98 07/19/2024
3.1.4 119 07/19/2024
3.1.3 97 07/19/2024
3.1.2 111 07/22/2024
3.1.1.2 108 07/19/2024
3.1.1.1 114 07/19/2024
3.1.1 111 07/19/2024
3.1.0 107 07/17/2024
3.0.1 113 06/24/2024
3.0.0 113 06/17/2024
2.2.4 110 07/19/2024
2.2.0 99 07/19/2024
2.1.2 108 07/19/2024
2.1.1.1 95 07/19/2024
2.1.1 101 07/19/2024
2.1.0 108 07/19/2024
2.0.2 109 07/19/2024
2.0.1 99 07/19/2024
2.0.0 104 07/19/2024
1.1.1 100 07/19/2024
1.1.0 110 07/19/2024
1.0.2 116 07/19/2024
1.0.1 105 07/19/2024
1.0.0 106 07/19/2024