Npgsql.EntityFrameworkCore.PostgreSQL 7.0.0-preview.6

Prefix Reserved
This is a prerelease version of Npgsql.EntityFrameworkCore.PostgreSQL.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL --version 7.0.0-preview.6                
NuGet\Install-Package Npgsql.EntityFrameworkCore.PostgreSQL -Version 7.0.0-preview.6                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.0-preview.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Npgsql.EntityFrameworkCore.PostgreSQL --version 7.0.0-preview.6                
#r "nuget: Npgsql.EntityFrameworkCore.PostgreSQL, 7.0.0-preview.6"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Npgsql.EntityFrameworkCore.PostgreSQL as a Cake Addin
#addin nuget:?package=Npgsql.EntityFrameworkCore.PostgreSQL&version=7.0.0-preview.6&prerelease

// Install Npgsql.EntityFrameworkCore.PostgreSQL as a Cake Tool
#tool nuget:?package=Npgsql.EntityFrameworkCore.PostgreSQL&version=7.0.0-preview.6&prerelease                

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.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1.2K)

Showing the top 5 NuGet packages that depend on Npgsql.EntityFrameworkCore.PostgreSQL:

Package Downloads
Npgsql.EntityFrameworkCore.PostgreSQL.Design

PostgreSQL/Npgsql provider for Entity Framework Core.

Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite

NetTopologySuite PostGIS spatial support plugin for PostgreSQL/Npgsql Entity Framework Core provider.

Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime

NodaTime support plugin for PostgreSQL/Npgsql Entity Framework Core provider.

Npgsql.Bulk

Extension for Entity Framework Npgsql for Bulk Copy

Reo.Core.Database

Package Description

GitHub repositories (233)

Showing the top 5 popular GitHub repositories that depend on Npgsql.EntityFrameworkCore.PostgreSQL:

Repository Stars
dotnet/aspnetcore
ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
bitwarden/server
Bitwarden infrastructure/backend (API, database, Docker, etc).
abpframework/abp
Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
MassTransit/MassTransit
Distributed Application Framework for .NET
elsa-workflows/elsa-core
A .NET workflows library
Version Downloads Last updated
9.0.0-rc.2 23,095 10/13/2024
9.0.0-rc.1 26,773 9/13/2024
9.0.0-preview.7 6,294 9/1/2024
9.0.0-preview.3 109,857 4/12/2024
9.0.0-preview.2 12,078 3/22/2024
9.0.0-preview.1 31,297 2/14/2024
8.0.10 670,572 10/17/2024
8.0.8 971,843 9/27/2024
8.0.4 11,727,946 5/11/2024
8.0.2 7,649,101 2/17/2024
8.0.0 7,039,999 11/21/2023
8.0.0-rc.2 160,583 10/11/2023
8.0.0-rc.1 53,632 9/14/2023
8.0.0-preview.7 15,866 8/18/2023
8.0.0-preview.4 67,444 5/20/2023
8.0.0-preview.3 35,839 4/24/2023
8.0.0-preview.2 28,370 3/20/2023
8.0.0-preview.1 62,622 3/3/2023
7.0.18 779,695 5/11/2024
7.0.11 7,686,067 9/15/2023
7.0.4 11,709,814 4/24/2023
7.0.3 7,289,226 2/15/2023
7.0.1 5,108,096 12/17/2022
7.0.0 3,052,263 11/9/2022
7.0.0-rc.2 56,398 10/11/2022
7.0.0-rc.1 16,672 9/16/2022
7.0.0-preview.7 16,096 8/9/2022
7.0.0-preview.6 14,425 7/13/2022
7.0.0-preview.5 10,394 6/19/2022
7.0.0-preview.4 17,372 5/11/2022
7.0.0-preview.3 13,154 4/19/2022
7.0.0-preview.2 24,115 3/16/2022
7.0.0-preview.1 10,075 2/17/2022
6.0.29 741,943 5/11/2024
6.0.22 1,856,889 9/15/2023
6.0.8 9,268,670 12/17/2022
6.0.7 9,274,999 9/16/2022
6.0.6 8,331,588 8/4/2022
6.0.5 5,850,354 6/19/2022
6.0.4 8,219,876 4/19/2022
6.0.3 7,495,441 1/27/2022
6.0.2 3,842,715 12/22/2021
6.0.1 5,088,338 12/3/2021
6.0.0 4,013,761 11/9/2021
6.0.0-rc.2 132,470 10/14/2021
6.0.0-rc.1 122,091 9/24/2021
6.0.0-preview7 19,884 8/16/2021
6.0.0-preview6 5,904 7/31/2021
6.0.0-preview5 44,078 7/1/2021
6.0.0-preview4 32,029 5/27/2021
6.0.0-preview3 22,802 4/15/2021
6.0.0-preview2 9,195 3/11/2021
6.0.0-preview1 12,643 2/16/2021
5.0.10 7,799,920 9/15/2021
5.0.7 5,348,278 6/13/2021
5.0.6 1,767,609 5/11/2021
5.0.5.1 1,248,324 4/21/2021
5.0.5 405,821 4/16/2021
5.0.2 4,495,133 1/19/2021
5.0.1 1,439,508 12/12/2020
5.0.0 1,805,062 11/15/2020
3.1.18 2,522,163 8/27/2021
3.1.11 2,742,050 1/21/2021
3.1.4 12,072,026 5/29/2020
3.1.3 3,276,620 3/26/2020
3.1.2 1,956,040 2/20/2020
3.1.1.2 761,784 2/6/2020
3.1.1.1 186,450 2/3/2020
3.1.1 349,490 1/31/2020
3.1.0 2,915,780 12/4/2019
3.0.1 1,031,890 10/2/2019
3.0.0 266,389 9/26/2019
2.2.4 5,345,510 5/21/2019
2.2.0 5,441,119 12/7/2018
2.1.2 3,586,547 9/8/2018
2.1.1.1 1,174,353 7/15/2018
2.1.1 685,484 7/1/2018
2.1.0 1,284,421 5/31/2018
2.0.2 540,636 4/22/2018
2.0.1 567,027 1/11/2018
2.0.0 980,561 8/16/2017
1.1.1 258,918 7/25/2017
1.1.0 1,033,900 11/20/2016
1.0.2 70,341 9/24/2016
1.0.1 126,822 7/21/2016
1.0.0 181,741 6/29/2016