Npgsql.EntityFrameworkCore.PostgreSQL 11.0.0-preview.6

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 11.0

Version Downloads Last updated
11.0.0-preview.6 5 07/16/2026
11.0.0-preview.5 12 06/22/2026
11.0.0-preview.4 21 05/17/2026
11.0.0-preview.3 36 04/30/2026
11.0.0-preview.2 39 03/11/2026
11.0.0-preview.1 47 02/13/2026
10.0.3 5 07/10/2026
10.0.2 20 05/27/2026
10.0.1 56 03/13/2026
10.0.0 353 11/23/2025
10.0.0-rc.2 85 10/17/2025
10.0.0-rc.1 94 09/10/2025
10.0.0-preview.7 107 08/18/2025
10.0.0-preview.5 102 06/13/2025
10.0.0-preview.3 113 04/13/2025
10.0.0-preview.2 118 03/31/2025
10.0.0-preview.1 128 03/31/2025
9.0.4 801 03/15/2025
9.0.3 270 02/11/2025
9.0.2 142 12/22/2024
9.0.1 121 11/19/2024
9.0.0 126 11/19/2024
9.0.0-rc.2 125 10/21/2024
9.0.0-rc.1 135 09/19/2024
9.0.0-preview.7 119 09/19/2024
9.0.0-preview.3 144 07/19/2024
9.0.0-preview.2 182 07/19/2024
9.0.0-preview.1 162 07/19/2024
8.0.11 124 11/19/2024
8.0.10 319 10/22/2024
8.0.8 275 10/15/2024
8.0.4 415 06/27/2024
8.0.2 141 07/19/2024
8.0.0 446 02/04/2024
8.0.0-rc.2 156 07/19/2024
8.0.0-rc.1 166 07/19/2024
8.0.0-preview.7 161 07/19/2024
8.0.0-preview.4 158 07/19/2024
8.0.0-preview.3 159 07/19/2024
8.0.0-preview.2 121 07/19/2024
8.0.0-preview.1 161 07/19/2024
7.0.18 142 07/19/2024
7.0.11 148 07/19/2024
7.0.4 154 07/19/2024
7.0.3 213 02/04/2024
7.0.1 157 07/19/2024
7.0.0 152 02/04/2024
7.0.0-rc.2 175 07/19/2024
7.0.0-rc.1 140 07/19/2024
7.0.0-preview.7 133 07/19/2024
7.0.0-preview.6 132 07/19/2024
7.0.0-preview.5 146 07/19/2024
7.0.0-preview.4 128 07/19/2024
7.0.0-preview.3 130 07/19/2024
7.0.0-preview.2 136 07/19/2024
7.0.0-preview.1 133 07/19/2024
6.0.29 141 07/19/2024
6.0.22 156 07/19/2024
6.0.8 147 07/19/2024
6.0.7 153 07/19/2024
6.0.6 172 07/19/2024
6.0.5 152 07/19/2024
6.0.4 176 02/09/2024
6.0.3 206 02/04/2024
6.0.2 161 07/19/2024
6.0.1 173 07/19/2024
6.0.0 166 07/17/2024
6.0.0-rc.2 143 07/19/2024
6.0.0-rc.1 161 07/19/2024
6.0.0-preview7 153 07/19/2024
6.0.0-preview6 159 07/19/2024
6.0.0-preview5 140 07/19/2024
6.0.0-preview4 142 07/19/2024
6.0.0-preview3 153 07/19/2024
6.0.0-preview2 129 07/19/2024
6.0.0-preview1 133 07/19/2024
5.0.10 177 07/19/2024
5.0.7 139 07/19/2024
5.0.6 144 07/19/2024
5.0.5.1 123 07/19/2024
5.0.5 138 07/19/2024
5.0.2 154 07/19/2024
5.0.1 159 07/19/2024
5.0.0 141 07/19/2024
3.1.18 140 07/19/2024
3.1.11 144 07/19/2024
3.1.4 155 07/19/2024
3.1.3 135 07/19/2024
3.1.2 165 07/22/2024
3.1.1.2 144 07/19/2024
3.1.1.1 162 07/19/2024
3.1.1 151 07/19/2024
3.1.0 171 07/17/2024
3.0.1 165 06/24/2024
3.0.0 158 06/17/2024
2.2.4 156 07/19/2024
2.2.0 152 07/19/2024
2.1.2 146 07/19/2024
2.1.1.1 138 07/19/2024
2.1.1 158 07/19/2024
2.1.0 146 07/19/2024
2.0.2 145 07/19/2024
2.0.1 141 07/19/2024
2.0.0 145 07/19/2024
1.1.1 140 07/19/2024
1.1.0 150 07/19/2024
1.0.2 154 07/19/2024
1.0.1 166 07/19/2024
1.0.0 148 07/19/2024