Npgsql.EntityFrameworkCore.PostgreSQL 9.0.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 8.0
- Microsoft.EntityFrameworkCore (>= 9.0.0 && < 10.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.0 && < 10.0.0)
- Npgsql (>= 9.0.2)
Version | Downloads | Last updated |
---|---|---|
9.0.2 | 2 | 12/22/2024 |
9.0.1 | 9 | 11/19/2024 |
9.0.0 | 7 | 11/19/2024 |
9.0.0-rc.2 | 6 | 10/21/2024 |
9.0.0-rc.1 | 8 | 09/19/2024 |
9.0.0-preview.7 | 13 | 09/19/2024 |
9.0.0-preview.3 | 33 | 07/19/2024 |
9.0.0-preview.2 | 40 | 07/19/2024 |
9.0.0-preview.1 | 45 | 07/19/2024 |
8.0.11 | 10 | 11/19/2024 |
8.0.10 | 24 | 10/22/2024 |
8.0.8 | 28 | 10/15/2024 |
8.0.4 | 177 | 06/27/2024 |
8.0.2 | 24 | 07/19/2024 |
8.0.0 | 189 | 02/04/2024 |
8.0.0-rc.2 | 28 | 07/19/2024 |
8.0.0-rc.1 | 32 | 07/19/2024 |
8.0.0-preview.7 | 34 | 07/19/2024 |
8.0.0-preview.4 | 42 | 07/19/2024 |
8.0.0-preview.3 | 34 | 07/19/2024 |
8.0.0-preview.2 | 23 | 07/19/2024 |
8.0.0-preview.1 | 46 | 07/19/2024 |
7.0.18 | 29 | 07/19/2024 |
7.0.11 | 34 | 07/19/2024 |
7.0.4 | 34 | 07/19/2024 |
7.0.3 | 94 | 02/04/2024 |
7.0.1 | 30 | 07/19/2024 |
7.0.0 | 44 | 02/04/2024 |
7.0.0-rc.2 | 41 | 07/19/2024 |
7.0.0-rc.1 | 28 | 07/19/2024 |
7.0.0-preview.7 | 33 | 07/19/2024 |
7.0.0-preview.6 | 30 | 07/19/2024 |
7.0.0-preview.5 | 32 | 07/19/2024 |
7.0.0-preview.4 | 31 | 07/19/2024 |
7.0.0-preview.3 | 33 | 07/19/2024 |
7.0.0-preview.2 | 31 | 07/19/2024 |
7.0.0-preview.1 | 34 | 07/19/2024 |
6.0.29 | 35 | 07/19/2024 |
6.0.22 | 37 | 07/19/2024 |
6.0.8 | 30 | 07/19/2024 |
6.0.7 | 35 | 07/19/2024 |
6.0.6 | 31 | 07/19/2024 |
6.0.5 | 41 | 07/19/2024 |
6.0.4 | 59 | 02/09/2024 |
6.0.3 | 72 | 02/04/2024 |
6.0.2 | 41 | 07/19/2024 |
6.0.1 | 40 | 07/19/2024 |
6.0.0 | 26 | 07/17/2024 |
6.0.0-rc.2 | 31 | 07/19/2024 |
6.0.0-rc.1 | 36 | 07/19/2024 |
6.0.0-preview7 | 32 | 07/19/2024 |
6.0.0-preview6 | 34 | 07/19/2024 |
6.0.0-preview5 | 38 | 07/19/2024 |
6.0.0-preview4 | 31 | 07/19/2024 |
6.0.0-preview3 | 35 | 07/19/2024 |
6.0.0-preview2 | 32 | 07/19/2024 |
6.0.0-preview1 | 33 | 07/19/2024 |
5.0.10 | 31 | 07/19/2024 |
5.0.7 | 25 | 07/19/2024 |
5.0.6 | 26 | 07/19/2024 |
5.0.5.1 | 30 | 07/19/2024 |
5.0.5 | 30 | 07/19/2024 |
5.0.2 | 35 | 07/19/2024 |
5.0.1 | 40 | 07/19/2024 |
5.0.0 | 30 | 07/19/2024 |
3.1.18 | 33 | 07/19/2024 |
3.1.11 | 26 | 07/19/2024 |
3.1.4 | 38 | 07/19/2024 |
3.1.3 | 30 | 07/19/2024 |
3.1.2 | 36 | 07/22/2024 |
3.1.1.2 | 33 | 07/19/2024 |
3.1.1.1 | 36 | 07/19/2024 |
3.1.1 | 30 | 07/19/2024 |
3.1.0 | 31 | 07/17/2024 |
3.0.1 | 27 | 06/24/2024 |
3.0.0 | 44 | 06/17/2024 |
2.2.4 | 37 | 07/19/2024 |
2.2.0 | 31 | 07/19/2024 |
2.1.2 | 34 | 07/19/2024 |
2.1.1.1 | 26 | 07/19/2024 |
2.1.1 | 38 | 07/19/2024 |
2.1.0 | 32 | 07/19/2024 |
2.0.2 | 30 | 07/19/2024 |
2.0.1 | 33 | 07/19/2024 |
2.0.0 | 33 | 07/19/2024 |
1.1.1 | 28 | 07/19/2024 |
1.1.0 | 37 | 07/19/2024 |
1.0.2 | 40 | 07/19/2024 |
1.0.1 | 31 | 07/19/2024 |
1.0.0 | 30 | 07/19/2024 |