{"id":13430361,"url":"https://github.com/npgsql/npgsql","last_synced_at":"2026-03-12T18:51:34.500Z","repository":{"id":1953465,"uuid":"2883574","full_name":"npgsql/npgsql","owner":"npgsql","description":"Npgsql is the .NET data provider for PostgreSQL.","archived":false,"fork":false,"pushed_at":"2025-05-07T10:49:50.000Z","size":66330,"stargazers_count":3463,"open_issues_count":298,"forks_count":848,"subscribers_count":151,"default_branch":"main","last_synced_at":"2025-05-09T01:11:43.085Z","etag":null,"topics":["c-sharp","database","dotnet","npgsql","postgres","postgresql","sql"],"latest_commit_sha":null,"homepage":"http://www.npgsql.org","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"postgresql","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/npgsql.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2011-11-30T14:13:32.000Z","updated_at":"2025-05-07T23:18:53.000Z","dependencies_parsed_at":"2023-10-14T23:14:48.882Z","dependency_job_id":"bc933b0f-1210-40a5-8175-ca7cf6923d69","html_url":"https://github.com/npgsql/npgsql","commit_stats":{"total_commits":5452,"total_committers":218,"mean_commits":"25.009174311926607","dds":"0.47688921496698455","last_synced_commit":"7de5d711476af1389cba921103f344f37e8adfb8"},"previous_names":[],"tags_count":181,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npgsql%2Fnpgsql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npgsql%2Fnpgsql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npgsql%2Fnpgsql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npgsql%2Fnpgsql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/npgsql","download_url":"https://codeload.github.com/npgsql/npgsql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253351693,"owners_count":21895021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-sharp","database","dotnet","npgsql","postgres","postgresql","sql"],"created_at":"2024-07-31T02:00:52.700Z","updated_at":"2025-11-12T21:41:27.212Z","avatar_url":"https://github.com/npgsql.png","language":"C#","readme":"# Npgsql - the .NET data provider for PostgreSQL\n\n[![stable](https://img.shields.io/nuget/v/Npgsql.svg?label=stable)](https://www.nuget.org/packages/Npgsql/)\n[![next patch](https://img.shields.io/myget/npgsql/v/npgsql.svg?label=next%20patch)](https://www.myget.org/feed/npgsql/package/nuget/Npgsql)\n[![daily builds (vnext)](https://img.shields.io/myget/npgsql-vnext/v/npgsql.svg?label=vnext)](https://www.myget.org/feed/npgsql-vnext/package/nuget/Npgsql)\n[![build](https://github.com/npgsql/npgsql/actions/workflows/build.yml/badge.svg)](https://github.com/npgsql/npgsql/actions/workflows/build.yml)\n[![gitter](https://img.shields.io/badge/gitter-join%20chat-brightgreen.svg)](https://gitter.im/npgsql/npgsql)\n\n## What is Npgsql?\n\nNpgsql is the open source .NET data provider for PostgreSQL. It allows you to connect and interact with PostgreSQL server using .NET.\n\nFor the full documentation, please visit [the Npgsql website](https://www.npgsql.org). For the Entity Framework Core provider that works with this provider, see [Npgsql.EntityFrameworkCore.PostgreSQL](https://github.com/npgsql/efcore.pg).\n\n## Quickstart\n\nHere's a basic code snippet to get you started:\n\n```csharp\nusing Npgsql;\n\nvar connString = \"Host=myserver;Username=mylogin;Password=mypass;Database=mydatabase\";\n\nvar dataSourceBuilder = new NpgsqlDataSourceBuilder(connString);\nvar dataSource = dataSourceBuilder.Build();\n\nvar conn = await dataSource.OpenConnectionAsync();\n\n// Insert some data\nawait using (var cmd = new NpgsqlCommand(\"INSERT INTO data (some_field) VALUES (@p)\", conn))\n{\n    cmd.Parameters.AddWithValue(\"p\", \"Hello world\");\n    await cmd.ExecuteNonQueryAsync();\n}\n\n// Retrieve all rows\nawait using (var cmd = new NpgsqlCommand(\"SELECT some_field FROM data\", conn))\nawait using (var reader = await cmd.ExecuteReaderAsync())\n{\n    while (await reader.ReadAsync())\n        Console.WriteLine(reader.GetString(0));\n}\n```\n\n## Key features\n\n* High-performance PostgreSQL driver. Regularly figures in the top contenders on the [TechEmpower Web Framework Benchmarks](https://www.techempower.com/benchmarks/).\n* Full support of most PostgreSQL types, including advanced ones such as arrays, enums, ranges, multiranges, composites, JSON, PostGIS and others.\n* Highly-efficient bulk import/export API.\n* Failover, load balancing and general multi-host support.\n* Great integration with Entity Framework Core via [Npgsql.EntityFrameworkCore.PostgreSQL](https://www.nuget.org/packages/Npgsql.EntityFrameworkCore.PostgreSQL).\n\nFor the full documentation, please visit the Npgsql website at [https://www.npgsql.org](https://www.npgsql.org).\n","funding_links":[],"categories":["Frameworks, Libraries and Tools","🗒️ Cheatsheets","C\\#","框架, 库和工具","Database Drivers","Compiled list","Language bindings"],"sub_categories":["Database Drivers","📦 Libraries","数据库驱动程序","plv8:"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpgsql%2Fnpgsql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpgsql%2Fnpgsql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpgsql%2Fnpgsql/lists"}