{"id":20697525,"url":"https://github.com/epomatti/mssql-dotnet-bulk-update","last_synced_at":"2026-04-11T17:02:51.690Z","repository":{"id":174467837,"uuid":"652021792","full_name":"epomatti/mssql-dotnet-bulk-update","owner":"epomatti","description":".NET Core ADO.NET bulk update on MSSQL","archived":false,"fork":false,"pushed_at":"2023-06-11T16:02:47.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-11T02:51:14.732Z","etag":null,"topics":["azure","azure-sql","azure-sql-database","bicep","csharp","dotnet","dotnet-core","mssql","powerapps","sql","sql-server","tsql"],"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/epomatti.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-10T20:44:27.000Z","updated_at":"2023-09-10T02:42:44.000Z","dependencies_parsed_at":"2023-07-28T03:31:40.864Z","dependency_job_id":null,"html_url":"https://github.com/epomatti/mssql-dotnet-bulk-update","commit_stats":null,"previous_names":["epomatti/mssql-dotnet-bulk-update"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/epomatti/mssql-dotnet-bulk-update","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fmssql-dotnet-bulk-update","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fmssql-dotnet-bulk-update/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fmssql-dotnet-bulk-update/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fmssql-dotnet-bulk-update/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epomatti","download_url":"https://codeload.github.com/epomatti/mssql-dotnet-bulk-update/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fmssql-dotnet-bulk-update/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31687882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["azure","azure-sql","azure-sql-database","bicep","csharp","dotnet","dotnet-core","mssql","powerapps","sql","sql-server","tsql"],"created_at":"2024-11-17T00:18:52.892Z","updated_at":"2026-04-11T17:02:51.671Z","avatar_url":"https://github.com/epomatti.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# .NET Core Batch Update\n\nUsing ADO.NET bulk update to create data on MSSQL.\n\n\u003e This example follows AdventureWorks [naming conventions][3]\n\n## Creating the database\n\nFor local development, launch a docker instance:\n\n```sh\ndocker run -e \"ACCEPT_EULA=Y\" -e \"MSSQL_SA_PASSWORD=Str0ngP4ssword#2023\" --name mssql-powerapps -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest\n```\n\nFor real performance testing, start a database on Azure.\n\nMake sure you have the Bicep latest release:\n\n```sh\naz bicep upgrade\n```\n\nCreate the resources on Azure:\n\n\u003e 💡 Edit security and location parameters according to your needs - this code is only for demo purposes\n\n```sh\n# Edit the required values\ncp config-template.json config.json\n\n# Run the Bicep template\naz deployment group create --resource-group powerapps --template-file main.bicep\n```\n\nSwitching the DTU capacity during benchmark:\n\n```sh\n# Options with DTU are S0(10), S1(20), S2(50), S3(100)...\naz sql db update -g powerapps -s sqlpowerappsbenchmark -n sqldbbenchmark --service-objective S3 --max-size 250GB\n\n# Go back to Basic to save costs\naz sql db update -g powerapps -s sqlpowerappsbenchmark -n sqldbbenchmark --service-objective Basic --max-size 2GB\n```\n\n\u003e ℹ️ Read ore about capacity options in the [purchasing models][1] documentation.\n\n\u003e 💡 DTU model supports columnstore indexing starting from `S3` and above\n\n## Create the schema\n\nThe sample schema compatible with this code is available in the [`schema.sql`](/tsql/schema.sql) file.\n\nUse your fav IDE such as Azure Data Studio to create the objects.\n\n## Run the batch\n\nAfter creating the schema, enter the console app directory to set it up.\n\n```sh\ncd dataload\ncp template.env .env\n```\n\nGet the database connection string:\n\n```sh\naz sql db show-connection-string -s sqlpowerappsbenchmark -n sqldbbenchmark -c ado.net\n```\n\nAdd the connection string to the `.env` file, replacing the username and password.\n\nRun the application:\n\n```sh\ndotnet restore\ndotnet run\n```\n\nThe console app will use bulk update to create the data.\n\n---\n\nWhen finished, delete the resources:\n\n```sh\naz group delete -n powerapps -y\n```\n\n[1]: https://learn.microsoft.com/en-us/azure/azure-sql/database/purchasing-models?view=azuresql\n[2]: https://stackoverflow.com/a/24877312/3231778\n[3]: https://learn.microsoft.com/en-us/previous-versions/sql/sql-server-2008/ms124438(v=sql.100)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepomatti%2Fmssql-dotnet-bulk-update","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepomatti%2Fmssql-dotnet-bulk-update","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepomatti%2Fmssql-dotnet-bulk-update/lists"}