Npgsql.EntityFrameworkCore.PostgreSQL 10.0.0-rc.2

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-rc.2 8 10/17/2025
10.0.0-rc.1 17 09/10/2025
10.0.0-preview.7 22 08/18/2025
10.0.0-preview.5 32 06/13/2025
10.0.0-preview.3 40 04/13/2025
10.0.0-preview.2 42 03/31/2025
10.0.0-preview.1 41 03/31/2025
9.0.4 332 03/15/2025
9.0.3 158 02/11/2025
9.0.2 41 12/22/2024
9.0.1 47 11/19/2024
9.0.0 45 11/19/2024
9.0.0-rc.2 43 10/21/2024
9.0.0-rc.1 48 09/19/2024
9.0.0-preview.7 47 09/19/2024
9.0.0-preview.3 69 07/19/2024
9.0.0-preview.2 77 07/19/2024
9.0.0-preview.1 83 07/19/2024
8.0.11 50 11/19/2024
8.0.10 194 10/22/2024
8.0.8 174 10/15/2024
8.0.4 330 06/27/2024
8.0.2 58 07/19/2024
8.0.0 346 02/04/2024
8.0.0-rc.2 63 07/19/2024
8.0.0-rc.1 69 07/19/2024
8.0.0-preview.7 68 07/19/2024
8.0.0-preview.4 83 07/19/2024
8.0.0-preview.3 72 07/19/2024
8.0.0-preview.2 54 07/19/2024
8.0.0-preview.1 84 07/19/2024
7.0.18 64 07/19/2024
7.0.11 70 07/19/2024
7.0.4 80 07/19/2024
7.0.3 137 02/04/2024
7.0.1 68 07/19/2024
7.0.0 82 02/04/2024
7.0.0-rc.2 77 07/19/2024
7.0.0-rc.1 62 07/19/2024
7.0.0-preview.7 72 07/19/2024
7.0.0-preview.6 63 07/19/2024
7.0.0-preview.5 72 07/19/2024
7.0.0-preview.4 65 07/19/2024
7.0.0-preview.3 68 07/19/2024
7.0.0-preview.2 66 07/19/2024
7.0.0-preview.1 66 07/19/2024
6.0.29 68 07/19/2024
6.0.22 80 07/19/2024
6.0.8 70 07/19/2024
6.0.7 72 07/19/2024
6.0.6 65 07/19/2024
6.0.5 77 07/19/2024
6.0.4 100 02/09/2024
6.0.3 116 02/04/2024
6.0.2 85 07/19/2024
6.0.1 77 07/19/2024
6.0.0 63 07/17/2024
6.0.0-rc.2 64 07/19/2024
6.0.0-rc.1 75 07/19/2024
6.0.0-preview7 66 07/19/2024
6.0.0-preview6 68 07/19/2024
6.0.0-preview5 75 07/19/2024
6.0.0-preview4 64 07/19/2024
6.0.0-preview3 74 07/19/2024
6.0.0-preview2 64 07/19/2024
6.0.0-preview1 64 07/19/2024
5.0.10 68 07/19/2024
5.0.7 63 07/19/2024
5.0.6 65 07/19/2024
5.0.5.1 61 07/19/2024
5.0.5 66 07/19/2024
5.0.2 75 07/19/2024
5.0.1 77 07/19/2024
5.0.0 69 07/19/2024
3.1.18 62 07/19/2024
3.1.11 60 07/19/2024
3.1.4 83 07/19/2024
3.1.3 63 07/19/2024
3.1.2 78 07/22/2024
3.1.1.2 67 07/19/2024
3.1.1.1 71 07/19/2024
3.1.1 73 07/19/2024
3.1.0 68 07/17/2024
3.0.1 69 06/24/2024
3.0.0 76 06/17/2024
2.2.4 75 07/19/2024
2.2.0 64 07/19/2024
2.1.2 73 07/19/2024
2.1.1.1 59 07/19/2024
2.1.1 70 07/19/2024
2.1.0 73 07/19/2024
2.0.2 65 07/19/2024
2.0.1 68 07/19/2024
2.0.0 65 07/19/2024
1.1.1 74 07/19/2024
1.1.0 71 07/19/2024
1.0.2 75 07/19/2024
1.0.1 69 07/19/2024
1.0.0 70 07/19/2024