Npgsql 8.0.7

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
36
EntityFramework6.Npgsql
PostgreSQL provider for Entity Framework 6
37
EntityFramework6.Npgsql
PostgreSQL provider for Entity Framework 6
38
EntityFramework6.Npgsql
PostgreSQL provider for Entity Framework 6
39
EntityFramework6.Npgsql
PostgreSQL provider for Entity Framework 6
42
EntityFramework6.Npgsql
PostgreSQL provider for Entity Framework 6
45
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.
37
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.
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.
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.
37
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.
42
Npgsql.EntityFramework
Postgresql provider for Entity Framework 6 and above
36
Npgsql.EntityFramework
Postgresql provider for Entity Framework 6 and above
38
Npgsql.EntityFramework
Postgresql provider for Entity Framework 6 and above
39
Npgsql.EntityFramework
Postgresql provider for Entity Framework 6 and above
45
Npgsql.EntityFrameworkCore.PostgreSQL.Design
Npgsql.EntityFrameworkCore.PostgreSQL.Design
36

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