{"id":22511914,"url":"https://github.com/jandev/azurefunctions-sqlbinding","last_synced_at":"2025-08-03T15:30:41.595Z","repository":{"id":34908769,"uuid":"188986078","full_name":"Jandev/azurefunctions-sqlbinding","owner":"Jandev","description":"  A lightweight project with a MS SQL Server binding for Azure Functions","archived":false,"fork":false,"pushed_at":"2024-01-17T08:17:18.000Z","size":77,"stargazers_count":4,"open_issues_count":2,"forks_count":3,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2024-11-07T21:46:30.961Z","etag":null,"topics":["azure","azure-functions","sql-server"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"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/Jandev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-28T08:22:11.000Z","updated_at":"2023-08-24T07:11:06.000Z","dependencies_parsed_at":"2022-08-08T02:16:03.738Z","dependency_job_id":null,"html_url":"https://github.com/Jandev/azurefunctions-sqlbinding","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jandev%2Fazurefunctions-sqlbinding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jandev%2Fazurefunctions-sqlbinding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jandev%2Fazurefunctions-sqlbinding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jandev%2Fazurefunctions-sqlbinding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jandev","download_url":"https://codeload.github.com/Jandev/azurefunctions-sqlbinding/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228548555,"owners_count":17935226,"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":["azure","azure-functions","sql-server"],"created_at":"2024-12-07T02:14:31.868Z","updated_at":"2024-12-07T02:14:32.451Z","avatar_url":"https://github.com/Jandev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\nThis project is created to provide a simple \nMicrosoft SQL Server binding for Azure Functions.\n\n# Supported features\n\nThe following commands are supported as of now.\n\n## Input binding\n\nThe input binding can be used as like the following\npiece of code.\n\n```csharp\n[FunctionName(nameof(GetSingleRecord))]\npublic static IActionResult GetSingleRecord(\n\t[HttpTrigger(AuthorizationLevel.Anonymous, \"get\", Route = nameof(GetSingleRecord))]\n\tHttpRequest req,\n\t[SqlServer(Query = \"SELECT TOP 1 Id, Name, Description FROM MyTable\")]\n\tSqlServerModel model)\n{\n\treturn new OkObjectResult(model.Record.Id);\n}\n\n[FunctionName(nameof(GetCollectionFromSqlServer))]\npublic static IActionResult GetCollectionFromSqlServer(\n\t[HttpTrigger(AuthorizationLevel.Anonymous, \"get\", Route = nameof(GetCollectionFromSqlServer))]\n\tHttpRequest req,\n\t[SqlServer(Query = \"SELECT TOP 100 Id, Name, Description FROM MyTable\")]\n\tIEnumerable\u003cSqlServerModel\u003e collection)\n{\n\treturn new OkObjectResult(collection.Select(m =\u003e m.Record.Id));\n}\n```\n\nIn order for this to work you need a `local.settings.json`\nfile with a proper connectionstring. If not specified\nthe default name `SqlServerConnectionString` will be used.\n\n```json\n{\n\t\"IsEncrypted\": false,\n\t\"Values\": {\n\t\t\"AzureWebJobsStorage\": \"UseDevelopmentStorage=true\",\n\t\t\"FUNCTIONS_WORKER_RUNTIME\": \"dotnet\"\n\t},\n\t\"ConnectionStrings\": {\n\t\t\"SqlServerConnectionString\": \"Server=(localdb)\\\\myInstance;Database=MySqlBindingDatabase;Trusted_Connection=True\",\n\t\t\"providerName\": \"System.Data.SqlClient\"\n\t}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjandev%2Fazurefunctions-sqlbinding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjandev%2Fazurefunctions-sqlbinding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjandev%2Fazurefunctions-sqlbinding/lists"}