{"id":23427390,"url":"https://github.com/nhatthaiquang-agilityio/dotnet-sqlserver-example","last_synced_at":"2026-04-06T08:01:37.290Z","repository":{"id":43896316,"uuid":"187457273","full_name":"nhatthaiquang-agilityio/dotnet-sqlserver-example","owner":"nhatthaiquang-agilityio","description":"ASP Net Core API with SQL Server and Testing","archived":false,"fork":false,"pushed_at":"2022-08-31T08:53:58.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T12:29:44.277Z","etag":null,"topics":["aspnetcore","docker","docker-compose","dotnet","sqlserver","testing","xunit"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nhatthaiquang-agilityio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-19T09:29:13.000Z","updated_at":"2022-07-08T02:36:58.000Z","dependencies_parsed_at":"2023-01-16T18:00:21.223Z","dependency_job_id":null,"html_url":"https://github.com/nhatthaiquang-agilityio/dotnet-sqlserver-example","commit_stats":null,"previous_names":["nhatthaiquang-agilityio/dotnet-sqlserver-example","nhatthai/dotnet-sqlserver-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nhatthaiquang-agilityio/dotnet-sqlserver-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhatthaiquang-agilityio%2Fdotnet-sqlserver-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhatthaiquang-agilityio%2Fdotnet-sqlserver-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhatthaiquang-agilityio%2Fdotnet-sqlserver-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhatthaiquang-agilityio%2Fdotnet-sqlserver-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nhatthaiquang-agilityio","download_url":"https://codeload.github.com/nhatthaiquang-agilityio/dotnet-sqlserver-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhatthaiquang-agilityio%2Fdotnet-sqlserver-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31464102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"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":["aspnetcore","docker","docker-compose","dotnet","sqlserver","testing","xunit"],"created_at":"2024-12-23T06:20:20.480Z","updated_at":"2026-04-06T08:01:37.274Z","avatar_url":"https://github.com/nhatthaiquang-agilityio.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dotnet SQL Server Example\nASP.NET Core API Server that uses SQL SERVER in the backend\n\n### Requirements\n-----------------\n+ Using Docker \u0026 Docker Compose\n+ NET CORE SDK 2.1 or 2.2\n+ ASPNET RUNTIME 2.1 or 2.2\n+ SQL SERVER\n\n## Notes\n---------\ndotnet-sqlserver-example.sln using for Visual Studio\nusing src.sln for docker compose\n\nConnectionString in appsettings.json\n+ Sql Server: still run in docker\n+ Using docker-compose: `Server=db`\n+ The app runs in Visual Studio then `Server=localhost`\n\n\n### Issues\n-----------\n+ How to migrate database in docker compose. We need to start database and migrate database first and then start web app.\n\nMy bad solution:\n+ Run `docker-compose up db`\n+ dotnet ef migrations add InitialCreate\n+ Run `docker-compose up web`\n\n\n### Usage\n----------\n\n#### Migration database\n```\ncd src/dotnet-sqlserver-example\ndotnet ef migrations add InitialCreate\n```\n\n#### Using Docker-Compose\n```\ncd devops\ndocker-compose up\n```\n\n#### Start project in Visual Studio\nOpen dotnet-sqlserver-example.csproj\nRun sql server in docker and run code in visual studio\n\n### Testing\n------------\nApply Integration Test with In-Memory\n```\ncd src/Testing\ndotnet test\n```\n\n### Reference\n--------------\n+ [Integration Testing](https://www.dotnetcurry.com/aspnet-core/1420/integration-testing-aspnet-core)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhatthaiquang-agilityio%2Fdotnet-sqlserver-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnhatthaiquang-agilityio%2Fdotnet-sqlserver-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhatthaiquang-agilityio%2Fdotnet-sqlserver-example/lists"}