Npgsql.EntityFrameworkCore.PostgreSQL 7.0.0-preview.4 The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved

.NET 6.0
This is a prerelease version of Npgsql.EntityFrameworkCore.PostgreSQL.
There is a newer prerelease version of this package available.
See the version list below for details.
Install-Package Npgsql.EntityFrameworkCore.PostgreSQL -Version 7.0.0-preview.4
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL --version 7.0.0-preview.4
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.0-preview.4" />
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.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Npgsql.EntityFrameworkCore.PostgreSQL, 7.0.0-preview.4"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. 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.4&prerelease

// Install Npgsql.EntityFrameworkCore.PostgreSQL as a Cake Tool
#tool nuget:?package=Npgsql.EntityFrameworkCore.PostgreSQL&version=7.0.0-preview.4&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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 Versions
.NET net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (700)

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

Package Downloads
EFCore.BulkExtensions

EntityFramework EF Core Bulk Batch Extensions for Insert Update Delete Read (CRUD) operations on SQL Server, PostgreSQL, SQLite

Npgsql.EntityFrameworkCore.PostgreSQL.Design

PostgreSQL/Npgsql provider for Entity Framework Core.

Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

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

Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

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

Util.Datas

Util.Datas是Util应用框架的数据访问类库。 Util是一个.net core平台下的应用框架,旨在提升小型团队的开发输出能力,由常用公共操作类(工具类)、分层架构基类、Ui组件,第三方组件封装,第三方业务接口封装,配套代码生成模板,权限等组成。

GitHub repositories (139)

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
The core infrastructure backend (API, database, Docker, etc).
abpframework/abp
Open Source Web Application Framework for ASP.NET Core
aspnet/Mvc
[Archived] ASP.NET Core MVC is a model view controller framework for building dynamic web sites with clean separation of concerns, including the merged MVC, Web API, and Web Pages w/ Razor. Project moved to https://github.com/aspnet/AspNetCore
MassTransit/MassTransit
Distributed Application Framework for .NET
Version Downloads Last updated
7.0.0-preview.5 643 6/19/2022
7.0.0-preview.4 6,644 5/11/2022
7.0.0-preview.3 3,711 4/19/2022
7.0.0-preview.2 10,186 3/16/2022
7.0.0-preview.1 4,941 2/17/2022
6.0.5 35,327 6/19/2022
6.0.4 1,127,028 4/19/2022
6.0.3 1,999,384 1/27/2022
6.0.2 1,281,575 12/22/2021
6.0.1 1,048,120 12/3/2021
6.0.0 658,154 11/9/2021
6.0.0-rc.2 108,082 10/14/2021
6.0.0-rc.1 27,362 9/24/2021
6.0.0-preview7 14,774 8/16/2021
6.0.0-preview6 4,909 7/31/2021
6.0.0-preview5 13,240 7/1/2021
6.0.0-preview4 29,526 5/27/2021
6.0.0-preview3 15,966 4/15/2021
6.0.0-preview2 8,014 3/11/2021
6.0.0-preview1 9,756 2/16/2021
5.0.10 3,579,771 9/15/2021
5.0.7 3,236,983 6/13/2021
5.0.6 1,215,517 5/11/2021
5.0.5.1 861,365 4/21/2021
5.0.5 251,360 4/16/2021
5.0.2 3,471,657 1/19/2021
5.0.1 1,057,561 12/12/2020
5.0.0 1,276,133 11/15/2020
3.1.18 760,135 8/27/2021
3.1.11 1,898,293 1/21/2021
3.1.4 8,908,936 5/29/2020
3.1.3 2,607,179 3/26/2020
3.1.2 1,510,092 2/20/2020
3.1.1.2 609,710 2/6/2020
3.1.1.1 163,886 2/3/2020
3.1.1 236,481 1/31/2020
3.1.0 2,195,131 12/4/2019
3.0.1 906,323 10/2/2019
3.0.0 214,855 9/26/2019
2.2.4 4,292,256 5/21/2019
2.2.0 4,444,731 12/7/2018
2.1.2 3,197,148 9/8/2018
2.1.1.1 898,275 7/15/2018
2.1.1 618,984 7/1/2018
2.1.0 1,076,322 5/31/2018
2.0.2 434,449 4/22/2018
2.0.1 512,735 1/11/2018
2.0.0 728,953 8/16/2017
1.1.1 176,701 7/25/2017
1.1.0 668,216 11/20/2016
1.0.2 48,300 9/24/2016
1.0.1 120,748 7/21/2016
1.0.0 85,109 6/29/2016