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 21 11/23/2025
10.0.0-rc.2 31 10/17/2025
10.0.0-rc.1 42 09/10/2025
10.0.0-preview.7 47 08/18/2025
10.0.0-preview.5 50 06/13/2025
10.0.0-preview.3 62 04/13/2025
10.0.0-preview.2 63 03/31/2025
10.0.0-preview.1 69 03/31/2025
9.0.4 513 03/15/2025
9.0.3 196 02/11/2025
9.0.2 68 12/22/2024
9.0.1 69 11/19/2024
9.0.0 76 11/19/2024
9.0.0-rc.2 68 10/21/2024
9.0.0-rc.1 80 09/19/2024
9.0.0-preview.7 69 09/19/2024
9.0.0-preview.3 93 07/19/2024
9.0.0-preview.2 96 07/19/2024
9.0.0-preview.1 115 07/19/2024
8.0.11 68 11/19/2024
8.0.10 226 10/22/2024
8.0.8 198 10/15/2024
8.0.4 364 06/27/2024
8.0.2 76 07/19/2024
8.0.0 382 02/04/2024
8.0.0-rc.2 89 07/19/2024
8.0.0-rc.1 93 07/19/2024
8.0.0-preview.7 93 07/19/2024
8.0.0-preview.4 107 07/19/2024
8.0.0-preview.3 105 07/19/2024
8.0.0-preview.2 75 07/19/2024
8.0.0-preview.1 113 07/19/2024
7.0.18 94 07/19/2024
7.0.11 98 07/19/2024
7.0.4 102 07/19/2024
7.0.3 159 02/04/2024
7.0.1 97 07/19/2024
7.0.0 107 02/04/2024
7.0.0-rc.2 108 07/19/2024
7.0.0-rc.1 91 07/19/2024
7.0.0-preview.7 95 07/19/2024
7.0.0-preview.6 86 07/19/2024
7.0.0-preview.5 98 07/19/2024
7.0.0-preview.4 84 07/19/2024
7.0.0-preview.3 87 07/19/2024
7.0.0-preview.2 90 07/19/2024
7.0.0-preview.1 91 07/19/2024
6.0.29 91 07/19/2024
6.0.22 105 07/19/2024
6.0.8 92 07/19/2024
6.0.7 98 07/19/2024
6.0.6 95 07/19/2024
6.0.5 103 07/19/2024
6.0.4 126 02/09/2024
6.0.3 144 02/04/2024
6.0.2 111 07/19/2024
6.0.1 112 07/19/2024
6.0.0 82 07/17/2024
6.0.0-rc.2 91 07/19/2024
6.0.0-rc.1 105 07/19/2024
6.0.0-preview7 95 07/19/2024
6.0.0-preview6 96 07/19/2024
6.0.0-preview5 93 07/19/2024
6.0.0-preview4 88 07/19/2024
6.0.0-preview3 97 07/19/2024
6.0.0-preview2 88 07/19/2024
6.0.0-preview1 90 07/19/2024
5.0.10 95 07/19/2024
5.0.7 92 07/19/2024
5.0.6 95 07/19/2024
5.0.5.1 85 07/19/2024
5.0.5 94 07/19/2024
5.0.2 91 07/19/2024
5.0.1 99 07/19/2024
5.0.0 97 07/19/2024
3.1.18 90 07/19/2024
3.1.11 84 07/19/2024
3.1.4 104 07/19/2024
3.1.3 87 07/19/2024
3.1.2 102 07/22/2024
3.1.1.2 93 07/19/2024
3.1.1.1 96 07/19/2024
3.1.1 99 07/19/2024
3.1.0 96 07/17/2024
3.0.1 101 06/24/2024
3.0.0 102 06/17/2024
2.2.4 104 07/19/2024
2.2.0 89 07/19/2024
2.1.2 102 07/19/2024
2.1.1.1 83 07/19/2024
2.1.1 93 07/19/2024
2.1.0 98 07/19/2024
2.0.2 99 07/19/2024
2.0.1 92 07/19/2024
2.0.0 98 07/19/2024
1.1.1 92 07/19/2024
1.1.0 99 07/19/2024
1.0.2 105 07/19/2024
1.0.1 91 07/19/2024
1.0.0 95 07/19/2024