Npgsql.EntityFrameworkCore.PostgreSQL 10.0.0-preview.5

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.

Showing the top 20 packages that depend on Npgsql.EntityFrameworkCore.PostgreSQL.

Packages Downloads
EFCore.BulkExtensions.PostgreSql
EntityFramework .Net EFCore EF Core Bulk Batch Extensions for Insert Update Delete Read (CRUD) operations on PostgreSQL
19
EFCore.BulkExtensions
EntityFramework EF Core Bulk Batch Extensions for Insert Update Delete and Read (CRUD) operations on SQL Server and SQLite
18
EFCore.BulkExtensions.PostgreSql
EntityFramework .Net EFCore EF Core Bulk Batch Extensions for Insert Update Delete Read (CRUD) operations on PostgreSQL
18
EFCore.BulkExtensions.PostgreSql
EntityFramework EF Core Bulk Batch Extensions for Insert Update Delete Read (CRUD) operations on PostgreSQL
18
EFCore.BulkExtensions.PostgreSql
EntityFramework .Net EFCore EF Core Bulk Batch Extensions for Insert Update Delete Read (CRUD) operations on PostgreSQL
17
EFCore.BulkExtensions.PostgreSql
EntityFramework EF Core Bulk Batch Extensions for Insert Update Delete Read (CRUD) operations on PostgreSQL
17
EFCore.BulkExtensions
EntityFramework EF Core Bulk Batch Extensions for Insert Update Delete Read (CRUD) operations on SQL Server, PostgreSQL, SQLite
16
EFCore.BulkExtensions
EntityFramework .Net EFCore EF Core Bulk Batch Extensions for Insert Update Delete Read (CRUD) operations on SQL Server, PostgreSQL, MySQL, SQLite
16
EFCore.BulkExtensions.PostgreSql
EntityFramework .Net EFCore EF Core Bulk Batch Extensions for Insert Update Delete Read (CRUD) operations on PostgreSQL
16
EFCore.BulkExtensions.PostgreSql
EntityFramework EF Core Bulk Batch Extensions for Insert Update Delete Read (CRUD) operations on PostgreSQL
16

.NET 10.0

Version Downloads Last updated
10.0.0-preview.5 5 06/17/2025
10.0.0-preview.3 7 04/20/2025
10.0.0-preview.2 9 04/01/2025
10.0.0-preview.1 11 03/02/2025
9.0.4 8 03/02/2025
9.0.3 12 01/19/2025
9.0.2 14 12/16/2024
9.0.1 16 11/30/2024
9.0.0-rc.2 16 11/30/2024
9.0.0-rc.1 17 10/09/2024
9.0.0-preview.7 17 10/09/2024
9.0.0-preview.3 18 09/24/2024
9.0.0-preview.2 17 08/02/2024
9.0.0-preview.1 14 10/09/2024
8.0.11 13 11/30/2024
8.0.10 13 11/30/2024
8.0.8 13 10/09/2024
8.0.4 14 09/27/2024
8.0.2 14 10/09/2024
8.0.0 20 04/05/2024
8.0.0-rc.2 14 10/09/2024
8.0.0-rc.1 13 10/09/2024
8.0.0-preview.7 13 10/09/2024
8.0.0-preview.4 13 10/09/2024
8.0.0-preview.3 17 10/09/2024
8.0.0-preview.2 17 10/09/2024
8.0.0-preview.1 13 10/09/2024
7.0.18 13 10/09/2024
7.0.11 13 10/09/2024
7.0.4 15 10/09/2024
7.0.3 12 10/08/2024
7.0.1 12 10/09/2024
7.0.0 13 10/09/2024
7.0.0-rc.2 12 10/09/2024
7.0.0-rc.1 13 10/09/2024
7.0.0-preview.7 14 10/09/2024
7.0.0-preview.6 17 10/09/2024
7.0.0-preview.5 14 10/09/2024
7.0.0-preview.4 14 10/09/2024
7.0.0-preview.3 14 10/09/2024
7.0.0-preview.2 16 10/09/2024
7.0.0-preview.1 16 10/09/2024
6.0.29 16 10/09/2024
6.0.22 17 10/09/2024
6.0.8 13 09/27/2024
6.0.7 13 10/09/2024
6.0.6 17 11/18/2022
6.0.5 16 10/09/2024
6.0.4 15 10/09/2024
6.0.3 16 10/09/2024
6.0.2 16 10/09/2024
6.0.1 17 10/09/2024
6.0.0 15 10/07/2024
6.0.0-rc.2 13 10/09/2024
6.0.0-rc.1 14 10/09/2024
6.0.0-preview7 13 10/09/2024
6.0.0-preview6 17 10/09/2024
6.0.0-preview5 14 10/09/2024
6.0.0-preview4 14 10/09/2024
6.0.0-preview3 15 10/09/2024
6.0.0-preview2 16 10/09/2024
6.0.0-preview1 16 10/01/2024
5.0.10 15 10/09/2024
5.0.7 16 10/09/2024
5.0.6 14 10/09/2024
5.0.5.1 12 10/09/2024
5.0.5 14 10/09/2024
5.0.2 16 10/09/2024
5.0.1 14 10/09/2024
5.0.0 16 10/09/2024
3.1.18 16 10/09/2024
3.1.11 16 10/09/2024
3.1.4 15 10/09/2024
3.1.3 17 10/09/2024
3.1.2 13 10/09/2024
3.1.1.2 14 10/09/2024
3.1.1.1 16 10/04/2024
3.1.1 17 10/09/2024
3.1.0 16 09/26/2024
3.0.1 13 10/09/2024
3.0.0 14 09/25/2024
2.2.4 14 10/08/2024
2.2.0 16 10/09/2024
2.1.2 13 10/09/2024
2.1.1.1 13 10/09/2024
2.1.1 14 10/09/2024
2.1.0 16 10/09/2024
2.0.2 14 10/09/2024
2.0.1 16 10/09/2024
2.0.0 13 10/09/2024
1.1.1 13 10/09/2024
1.1.0 17 09/28/2024
1.0.2 15 10/09/2024
1.0.1 13 10/09/2024
1.0.0 13 10/09/2024