Npgsql 10.0.0-rc.1

Npgsql is the open source .NET data provider for PostgreSQL. It allows you to connect and interact with PostgreSQL server using .NET.

Quickstart

Here's a basic code snippet to get you started:

var connString = "Host=myserver;Username=mylogin;Password=mypass;Database=mydatabase";

await using var conn = new NpgsqlConnection(connString);
await conn.OpenAsync();

// Insert some data
await using (var cmd = new NpgsqlCommand("INSERT INTO data (some_field) VALUES (@p)", conn))
{
    cmd.Parameters.AddWithValue("p", "Hello world");
    await cmd.ExecuteNonQueryAsync();
}

// Retrieve all rows
await using (var cmd = new NpgsqlCommand("SELECT some_field FROM data", conn))
await using (var reader = await cmd.ExecuteReaderAsync())
{
while (await reader.ReadAsync())
    Console.WriteLine(reader.GetString(0));
}

Key features

  • High-performance PostgreSQL driver. Regularly figures in the top contenders on the TechEmpower Web Framework Benchmarks.
  • Full support of most PostgreSQL types, including advanced ones such as arrays, enums, ranges, multiranges, composites, JSON, PostGIS and others.
  • Highly-efficient bulk import/export API.
  • Failover, load balancing and general multi-host support.
  • Great integration with Entity Framework Core via Npgsql.EntityFrameworkCore.PostgreSQL.

For the full documentation, please visit the Npgsql website.

Showing the top 20 packages that depend on Npgsql.

Packages Downloads
EntityFramework6.Npgsql
PostgreSQL provider for Entity Framework 6
40
EntityFramework6.Npgsql
PostgreSQL provider for Entity Framework 6
41
EntityFramework6.Npgsql
PostgreSQL provider for Entity Framework 6
43
EntityFramework6.Npgsql
PostgreSQL provider for Entity Framework 6
44
EntityFramework6.Npgsql
PostgreSQL provider for Entity Framework 6
48
Finsa.Caravan.DataAccess.PostgreSql
A long description of the package. This shows up in the right pane of the Add Package Dialog as well as in the Package Manager Console when listing packages using the Get-Package command.
39
Finsa.Caravan.DataAccess.PostgreSql
A long description of the package. This shows up in the right pane of the Add Package Dialog as well as in the Package Manager Console when listing packages using the Get-Package command.
42
Finsa.Caravan.DataAccess.PostgreSql
A long description of the package. This shows up in the right pane of the Add Package Dialog as well as in the Package Manager Console when listing packages using the Get-Package command.
46
Finsa.Caravan.DataAccess.PostgreSql
A long description of the package. This shows up in the right pane of the Add Package Dialog as well as in the Package Manager Console when listing packages using the Get-Package command. THIS PACKAGE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PACKAGE OR THE USE OR OTHER DEALINGS IN THE PACKAGE.
40
Finsa.Caravan.DataAccess.PostgreSql
A long description of the package. This shows up in the right pane of the Add Package Dialog as well as in the Package Manager Console when listing packages using the Get-Package command. THIS PACKAGE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PACKAGE OR THE USE OR OTHER DEALINGS IN THE PACKAGE.
38
Finsa.Caravan.DataAccess.PostgreSql
A long description of the package. This shows up in the right pane of the Add Package Dialog as well as in the Package Manager Console when listing packages using the Get-Package command. THIS PACKAGE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PACKAGE OR THE USE OR OTHER DEALINGS IN THE PACKAGE.
40
Finsa.Caravan.DataAccess.PostgreSql
A long description of the package. This shows up in the right pane of the Add Package Dialog as well as in the Package Manager Console when listing packages using the Get-Package command. THIS PACKAGE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PACKAGE OR THE USE OR OTHER DEALINGS IN THE PACKAGE.
44
Npgsql.EntityFramework
Postgresql provider for Entity Framework 6 and above
39
Npgsql.EntityFramework
Postgresql provider for Entity Framework 6 and above
40
Npgsql.EntityFramework
Postgresql provider for Entity Framework 6 and above
42
Npgsql.EntityFramework
Postgresql provider for Entity Framework 6 and above
43
Npgsql.EntityFramework
Postgresql provider for Entity Framework 6 and above
48
Npgsql.EntityFrameworkCore.PostgreSQL.Design
Npgsql.EntityFrameworkCore.PostgreSQL.Design
41
Npgsql.EntityFrameworkCore.PostgreSQL.Design
Npgsql.EntityFrameworkCore.PostgreSQL.Design
42

.NET 8.0

.NET 9.0

Version Downloads Last updated
10.0.0 1 11/30/2025
10.0.0-rc.1 16 10/09/2025
9.0.4 22 10/09/2025
9.0.3 20 03/06/2025
9.0.2 20 12/17/2024
9.0.1 21 11/22/2024
8.0.8 28 10/09/2025
8.0.7 22 03/08/2025
8.0.6 27 11/22/2024
8.0.5 25 10/23/2024
8.0.4 25 09/11/2024
8.0.3 21 05/12/2024
8.0.2 33 02/13/2024
8.0.1 30 02/14/2024
8.0.0 22 02/14/2024
8.0.0-rc.2 27 12/16/2023
8.0.0-preview.4 28 01/18/2024
8.0.0-preview.3 24 12/18/2023
8.0.0-preview.2 27 01/14/2024
8.0.0-preview.1 26 01/11/2024
7.0.10 19 03/26/2025
7.0.9 19 11/22/2024
7.0.8 23 09/11/2024
7.0.7 25 05/13/2024
7.0.6 33 12/04/2023
7.0.4 26 06/20/2023
7.0.2 24 02/14/2024
7.0.1 28 12/05/2023
7.0.0 31 12/09/2023
7.0.0-rc.2 24 02/14/2024
7.0.0-rc.1 24 02/14/2024
7.0.0-preview.7 21 02/14/2024
7.0.0-preview.6 22 02/14/2024
7.0.0-preview.5 33 02/14/2024
7.0.0-preview.4 23 02/14/2024
7.0.0-preview.3 28 02/14/2024
7.0.0-preview.2 21 02/14/2024
7.0.0-preview.1 23 02/14/2024
6.0.13 20 11/22/2024
6.0.12 22 09/11/2024
6.0.11 23 05/12/2024
6.0.10 26 01/14/2024
6.0.9 24 02/14/2024
6.0.8 25 06/20/2023
6.0.7 29 10/18/2022
6.0.6 24 02/14/2024
6.0.5 33 02/14/2024
6.0.4 27 07/04/2022
6.0.3 27 01/09/2024
6.0.2 28 02/13/2022
6.0.1 27 02/14/2024
6.0.0 23 12/08/2021
6.0.0-rc.2 25 02/14/2024
6.0.0-rc.1 27 02/14/2024
6.0.0-preview7 23 02/14/2024
6.0.0-preview6 24 02/14/2024
6.0.0-preview5 32 12/03/2023
6.0.0-preview4 23 12/11/2023
6.0.0-preview3 23 02/14/2024
6.0.0-preview2 32 12/05/2023
5.0.18 31 05/12/2024
5.0.17 24 02/14/2024
5.0.16 20 12/08/2023
5.0.15 20 12/12/2023
5.0.14 30 12/11/2023
5.0.13 23 02/14/2024
5.0.12 26 12/05/2023
5.0.11 26 02/14/2024
5.0.10 24 09/20/2021
5.0.7 27 08/04/2021
5.0.5 20 02/14/2024
5.0.4 22 01/23/2024
5.0.3 23 02/14/2024
5.0.2 33 02/14/2024
5.0.1.1 30 02/03/2021
5.0.0 26 01/18/2024
4.1.14 22 05/20/2024
4.1.13 28 05/13/2024
4.1.12 24 12/04/2023
4.1.11 22 12/04/2023
4.1.10 32 12/12/2023
4.1.9 36 01/16/2024
4.1.8 27 02/14/2024
4.1.7 36 02/14/2024
4.1.6 24 12/27/2023
4.1.5 24 01/17/2024
4.1.4 27 09/24/2020
4.1.3.1 30 02/14/2024
4.1.3 25 01/13/2024
4.1.2 28 01/11/2024
4.1.1 25 02/14/2024
4.1.0 30 01/17/2024
4.0.17 19 06/12/2024
4.0.16 22 05/20/2024
4.0.14 25 05/13/2024
4.0.13 24 02/14/2024
4.0.12 24 12/07/2023
4.0.11 27 01/19/2024
4.0.10 24 12/09/2023
4.0.9 32 02/14/2024
4.0.8 31 12/08/2023
4.0.7 23 02/14/2024
4.0.6 21 01/08/2024
4.0.5 24 12/05/2023
4.0.4 29 01/14/2024
4.0.3 25 01/16/2024
4.0.2 25 12/08/2023
4.0.1 26 02/14/2024
4.0.0 30 12/03/2023
4.0.0-rc1 26 02/14/2024
4.0.0-preview2 32 12/13/2023
4.0.0-preview1 24 12/27/2023
3.2.7 23 12/18/2023
3.2.6 27 12/08/2023
3.2.5 23 12/04/2023
3.2.4.1 22 12/15/2023
3.2.4 26 12/14/2023
3.2.3 32 12/03/2023
3.2.2 27 02/10/2020
3.2.1 24 02/10/2020
3.2.0 22 01/22/2024
3.1.10 21 12/07/2023
3.1.9 29 02/10/2020
3.1.8 26 12/08/2023
3.1.7 24 02/14/2024
3.1.6 24 12/19/2023
3.1.5 22 12/12/2023
3.1.4 31 01/19/2024
3.1.3 25 12/13/2023
3.1.2 21 12/06/2023
3.1.1 25 02/14/2024
3.1.0 25 12/11/2023
3.0.8 22 12/08/2023
3.0.7 25 01/18/2024
3.0.6 26 12/04/2023
3.0.5 24 12/16/2023
3.0.4 22 02/14/2024
3.0.3 24 02/14/2024
3.0.2 23 01/05/2024
3.0.1 26 12/05/2023
3.0.0 23 01/16/2024
2.2.7 26 02/10/2020
2.2.6 28 02/14/2024
2.2.5 25 01/14/2024
2.2.4.3 27 12/10/2023
2.2.4.1 20 02/14/2024
2.2.3 20 12/09/2023
2.2.2 24 02/14/2024
2.2.1 25 12/15/2023
2.2.0 24 02/14/2024
2.1.3 25 12/04/2023
2.1.2 27 01/06/2024
2.1.1 23 12/15/2023
2.1.0 28 01/16/2024
2.0.14.3 27 02/14/2024
2.0.12.1 33 02/14/2024
2.0.11 21 02/14/2024