Npgsql.EntityFrameworkCore.PostgreSQL 9.0.0-rc.1

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.SchemaCompare
Useful tool if you are changing the schema of your database's schema outside of EF Core' migrations, say by using SQL change scripts. See readme file on github.
1
Npgsql.EntityFrameworkCore.PostgreSQL.Design
Npgsql.EntityFrameworkCore.PostgreSQL.Design
1
Npgsql.EntityFrameworkCore.PostgreSQL.Design
PostgreSQL/Npgsql provider for Entity Framework Core.
2

.NET 8.0

Version Downloads Last updated
9.0.0-rc.1 1 22.09.2024
9.0.0-preview.7 0 01.09.2024
9.0.0-preview.3 0 12.04.2024
9.0.0-preview.2 0 22.03.2024
9.0.0-preview.1 1 26.02.2024
8.0.4 0 11.05.2024
8.0.2 1 09.05.2024
8.0.0 0 21.11.2023
8.0.0-rc.2 0 11.10.2023
8.0.0-rc.1 0 14.09.2023
8.0.0-preview.7 0 18.08.2023
8.0.0-preview.4 0 20.05.2023
8.0.0-preview.3 0 24.04.2023
8.0.0-preview.2 0 20.03.2023
8.0.0-preview.1 0 03.03.2023
7.0.18 0 11.05.2024
7.0.11 0 15.09.2023
7.0.4 0 24.04.2023
7.0.3 0 15.02.2023
7.0.1 0 17.12.2022
7.0.0 0 09.11.2022
7.0.0-rc.2 0 11.10.2022
7.0.0-rc.1 0 16.09.2022
7.0.0-preview.7 0 09.08.2022
7.0.0-preview.6 0 13.07.2022
7.0.0-preview.5 0 19.06.2022
7.0.0-preview.4 0 11.05.2022
7.0.0-preview.3 0 19.04.2022
7.0.0-preview.2 0 16.03.2022
7.0.0-preview.1 0 17.02.2022
6.0.29 0 11.05.2024
6.0.22 0 15.09.2023
6.0.8 0 17.12.2022
6.0.7 0 16.09.2022
6.0.6 0 04.08.2022
6.0.5 0 19.06.2022
6.0.4 0 19.04.2022
6.0.3 0 27.01.2022
6.0.2 0 22.12.2021
6.0.1 0 03.12.2021
6.0.0 0 09.11.2021
6.0.0-rc.2 0 14.10.2021
6.0.0-rc.1 0 24.09.2021
6.0.0-preview7 0 16.08.2021
6.0.0-preview6 0 31.07.2021
6.0.0-preview5 0 01.07.2021
6.0.0-preview4 0 27.05.2021
6.0.0-preview3 0 15.04.2021
6.0.0-preview2 0 11.03.2021
6.0.0-preview1 0 16.02.2021
5.0.10 0 15.09.2021
5.0.7 0 13.06.2021
5.0.6 0 11.05.2021
5.0.5.1 0 21.04.2021
5.0.5 0 16.04.2021
5.0.2 0 19.01.2021
5.0.1 0 12.12.2020
5.0.0 0 15.11.2020
3.1.18 0 27.08.2021
3.1.11 0 21.01.2021
3.1.4 0 29.05.2020
3.1.3 0 26.03.2020
3.1.2 0 20.02.2020
3.1.1.2 0 06.02.2020
3.1.1.1 0 03.02.2020
3.1.1 0 31.01.2020
3.1.0 0 04.12.2019
3.0.1 0 02.10.2019
3.0.0 0 26.09.2019
2.2.4 0 21.05.2019
2.2.0 0 07.12.2018
2.1.2 0 08.09.2018
2.1.1.1 0 15.07.2018
2.1.1 0 01.07.2018
2.1.0 0 31.05.2018
2.0.2 0 22.04.2018
2.0.1 0 11.01.2018
2.0.0 0 16.08.2017
1.1.1 0 25.07.2017
1.1.0 0 20.11.2016
1.0.2 0 24.09.2016
1.0.1 0 21.07.2016
1.0.0 0 29.06.2016