{"id":31202887,"url":"https://github.com/notilya4/notilya.sqlconnectionstring.extensions","last_synced_at":"2025-09-20T14:22:05.157Z","repository":{"id":189491523,"uuid":"680777791","full_name":"NotIlya4/NotIlya.SqlConnectionString.Extensions","owner":"NotIlya4","description":"📦 Extension for IConfiguration to get sql connection string","archived":false,"fork":false,"pushed_at":"2023-09-14T18:58:16.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-27T15:55:34.100Z","etag":null,"topics":["c-sharp","connection-string","dotnet","extensions"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NotIlya4.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":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-20T11:24:38.000Z","updated_at":"2023-08-20T21:57:11.000Z","dependencies_parsed_at":"2023-08-20T12:44:54.068Z","dependency_job_id":"92f3e3ce-060b-422b-9ce2-9941470aa490","html_url":"https://github.com/NotIlya4/NotIlya.SqlConnectionString.Extensions","commit_stats":null,"previous_names":["notilya4/notilya.sqlconnectionstring.extensions"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NotIlya4/NotIlya.SqlConnectionString.Extensions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotIlya4%2FNotIlya.SqlConnectionString.Extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotIlya4%2FNotIlya.SqlConnectionString.Extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotIlya4%2FNotIlya.SqlConnectionString.Extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotIlya4%2FNotIlya.SqlConnectionString.Extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotIlya4","download_url":"https://codeload.github.com/NotIlya4/NotIlya.SqlConnectionString.Extensions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotIlya4%2FNotIlya.SqlConnectionString.Extensions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276106314,"owners_count":25586259,"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","status":"online","status_checked_at":"2025-09-20T02:00:10.207Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["c-sharp","connection-string","dotnet","extensions"],"created_at":"2025-09-20T14:22:02.496Z","updated_at":"2025-09-20T14:22:05.148Z","avatar_url":"https://github.com/NotIlya4.png","language":"C#","readme":"# 📦 NotIlya.SqlConnectionString.Extensions [![NuGet Version](http://img.shields.io/nuget/v/NotIlya.SqlConnectionString.Extensions.svg?style=flat)](https://www.nuget.org/packages/NotIlya.SqlConnectionString.Extensions)\nSeveral extensions for `IConfiguration` that help retrieve connection strings, primarily designed for SQL Server (MSSQL) as I'm using `SqlConnectionStringBuilder` under the hood.\n\n## Quickstart\nYou can have config like this:\n```json\n{\n  \"SqlConnectionString\": {\n    \"Server\": \"localhost,1433\",\n    \"Database\": \"TestDb\"\n  }\n}\n```\nOr like this:\n```json\n{\n  \"SqlConnectionString\": \"localhost,1433;Database=TestDb\"\n}\n```\nAnd you can get it using `config.GetSqlConnectionString()`. \n\n## Custom section\nTo specify your own section use `key` parameter in any method:\n```json\n{\n  \"SqlServer\": {\n    \"Server\": \"localhost,1433\",\n    \"Database\": \"TestDb\"\n  }\n}\n```\nGet it by `config.GetSqlConnectionString(\"SqlServer\")`.\n\n## Development defaults\nThere is also method that has predefined defaults for development environments. Your empty config:\n```json\n{\n  \n}\n```\nUsing this `config.GetDevelopmentSqlConnectionString()` empty config will be equivalent to:\n```json\n{\n  \"SqlConnectionString\": {\n    \"Server\": \"localhost,1433\",\n    \"User Id\": \"SA\",\n    \"Password\": \"1tsJusT@S@mpleP@ssword!\",\n    \"MultipleActiveResultSets\": true,\n    \"TrustServerCertificate\": true\n  }\n}\n```\nOf course you can override any of this values by providing them in config.\n\n## SqlConnectionStringBuilder\nMy extensions built on top of `SqlConnectionStringBuilder` and instead of raw connection string you can get builder. Instead of `GetSqlConnectionString` use `GetSqlConnectionStringBuilder` and instead of `GetDevelopmentSqlConnectionString` use `GetDevelopmentSqlConnectionStringBuilder`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotilya4%2Fnotilya.sqlconnectionstring.extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotilya4%2Fnotilya.sqlconnectionstring.extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotilya4%2Fnotilya.sqlconnectionstring.extensions/lists"}