{"id":13415069,"url":"https://github.com/mongodb/mongo-csharp-driver","last_synced_at":"2026-01-17T15:31:38.942Z","repository":{"id":929904,"uuid":"699689","full_name":"mongodb/mongo-csharp-driver","owner":"mongodb","description":"The Official C# .NET Driver for MongoDB","archived":false,"fork":false,"pushed_at":"2026-01-12T18:27:00.000Z","size":842415,"stargazers_count":3221,"open_issues_count":30,"forks_count":1268,"subscribers_count":232,"default_branch":"main","last_synced_at":"2026-01-12T23:59:11.991Z","etag":null,"topics":["csharp","csharp-library","dotnet-framework","mongodb","nosql"],"latest_commit_sha":null,"homepage":"https://www.mongodb.com/docs/drivers/csharp/current/","language":"C#","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mongodb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2010-06-02T18:22:21.000Z","updated_at":"2026-01-12T18:27:05.000Z","dependencies_parsed_at":"2023-02-14T00:15:56.538Z","dependency_job_id":"e80123da-56e6-4c43-b74f-c010454943aa","html_url":"https://github.com/mongodb/mongo-csharp-driver","commit_stats":{"total_commits":4646,"total_committers":147,"mean_commits":31.60544217687075,"dds":0.7145931984502798,"last_synced_commit":"aa61ebe6055fb396b8a17b5e12836179dfbd2089"},"previous_names":[],"tags_count":148,"template":false,"template_full_name":null,"purl":"pkg:github/mongodb/mongo-csharp-driver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-csharp-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-csharp-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-csharp-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-csharp-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongodb","download_url":"https://codeload.github.com/mongodb/mongo-csharp-driver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-csharp-driver/sbom","scorecard":{"id":658474,"data":{"date":"2025-08-11","repo":{"name":"github.com/mongodb/mongo-csharp-driver","commit":"c288aadc3d52e44faad2d4738b36bebac00e3b33"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.4,"checks":[{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pr.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":1,"reason":"branch protection is not maximal on development and all release branches","details":["Warn: branch protection not enabled for branch 'v2.x'","Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Warn: codeowners review is not required on branch 'main'","Info: status check found to merge onto on branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: nugetCommand not pinned by hash: evergreen/run-sk.sh:33: pin your dependecies by either enabling central package management (https://learn.microsoft.com/nuget/consume-packages/Central-Package-Management) or using a lockfile (https://learn.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies)","Info:   0 out of   1 nugetCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}}]},"last_synced_at":"2025-08-21T15:22:11.971Z","repository_id":929904,"created_at":"2025-08-21T15:22:11.972Z","updated_at":"2025-08-21T15:22:11.972Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28511525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["csharp","csharp-library","dotnet-framework","mongodb","nosql"],"created_at":"2024-07-30T21:00:42.677Z","updated_at":"2026-01-17T15:31:38.911Z","avatar_url":"https://github.com/mongodb.png","language":"C#","readme":"﻿MongoDB C# Driver\n=================\n\n[![MongoDB.Driver](https://img.shields.io/nuget/v/MongoDB.Driver.svg)](https://www.nuget.org/packages/MongoDB.Driver/)\n[![Documentation](https://img.shields.io/badge/docs-docfx-blue.svg)](https://mongodb.github.io/mongo-csharp-driver/latest.html)\n[![Documentation](https://img.shields.io/badge/docs-mongo-green.svg)](https://www.mongodb.com/docs/drivers/csharp/current/)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/mongodb/mongo-csharp-driver/blob/main/LICENSE.md)\n\nThe official MongoDB .NET/C# driver.\n\nThe MongoDB .NET/C# driver follows [semantic versioning](https://semver.org/) since v3.0.0 of its releases.\n\nGetting Started\n---------------\n\n### Untyped Documents\n```C#\nusing MongoDB.Bson;\nusing MongoDB.Driver;\n```\n\n```C#\nvar client = new MongoClient(\"mongodb://localhost:27017\");\nvar database = client.GetDatabase(\"foo\");\nvar collection = database.GetCollection\u003cBsonDocument\u003e(\"bar\");\n\nawait collection.InsertOneAsync(new BsonDocument(\"Name\", \"Jack\"));\n\nvar list = await collection.Find(new BsonDocument(\"Name\", \"Jack\"))\n    .ToListAsync();\n\nforeach(var document in list)\n{\n    Console.WriteLine(document[\"Name\"]);\n}\n```\n\n### Typed Documents\n\n```C#\nusing MongoDB.Bson;\nusing MongoDB.Driver;\n```\n\n```C#\npublic class Person\n{\n    public ObjectId Id { get; set; }\n    public string Name { get; set; }\n}\n```\n\n```C#\nvar client = new MongoClient(\"mongodb://localhost:27017\");\nvar database = client.GetDatabase(\"foo\");\nvar collection = database.GetCollection\u003cPerson\u003e(\"bar\");\n\nawait collection.InsertOneAsync(new Person { Name = \"Jack\" });\n\nvar list = await collection.Find(x =\u003e x.Name == \"Jack\")\n    .ToListAsync();\n\nforeach(var person in list)\n{\n    Console.WriteLine(person.Name);\n}\n```\n\nDocumentation\n-------------\n* [MongoDB](https://www.mongodb.com/docs)\n* [.NET/C# Driver](https://www.mongodb.com/docs/drivers/csharp/current/)\n* [API Reference](https://mongodb.github.io/mongo-csharp-driver/3.5.0/api/index.html)\n\nQuestions/Bug Reports\n---------------------\n* [MongoDB Community Forum](https://www.mongodb.com/community/forums/tags/c/data/drivers-odms/7/dot-net)\n* [Jira](https://jira.mongodb.org/browse/CSHARP)\n\nIf you’ve identified a security vulnerability in a driver or any other MongoDB project, please report it according to the [instructions here](https://www.mongodb.com/docs/manual/tutorial/create-a-vulnerability-report).\n\nContributing\n------------\n\nPlease see our [guidelines](CONTRIBUTING.md) for contributing to the driver.\n\nThank you to [everyone](https://github.com/mongodb/mongo-csharp-driver/graphs/contributors) who has contributed to this project.\n","funding_links":[],"categories":["Frameworks, Libraries and Tools","Database Drivers","数据库驱动","Data Management \u0026 Processing","C#","Libraries","框架, 库和工具","C\\#","🗒️ Cheatsheets"],"sub_categories":["Database Drivers","Database \u0026 Cloud Management","Database, Database Drivers, and Migration","数据库驱动程序","C#/.NET ###","📦 Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fmongo-csharp-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongodb%2Fmongo-csharp-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fmongo-csharp-driver/lists"}