{"id":21272715,"url":"https://github.com/persteenolsen/dotnet-8-dapper-sqlite-api-xunit","last_synced_at":"2026-05-06T01:32:53.423Z","repository":{"id":262250119,"uuid":"886228381","full_name":"persteenolsen/dotnet-8-dapper-sqlite-api-xunit","owner":"persteenolsen","description":"Unit Testing with xUnit + .NET 8 REST API + Dapper ORM + SQLite + Angular 14 Client","archived":false,"fork":false,"pushed_at":"2024-11-11T16:40:06.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-18T18:58:48.244Z","etag":null,"topics":["dapper","dotnet","rest-api","sqlite","xunit"],"latest_commit_sha":null,"homepage":"https://dotnet.dapper.sqlite.api.persteenolsen.com/users","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/persteenolsen.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-10T14:36:05.000Z","updated_at":"2024-11-21T18:10:40.000Z","dependencies_parsed_at":"2024-11-11T12:40:27.390Z","dependency_job_id":"2a65fa98-dc17-4a9f-8cbf-b2695fe34a0a","html_url":"https://github.com/persteenolsen/dotnet-8-dapper-sqlite-api-xunit","commit_stats":null,"previous_names":["persteenolsen/dotnet-8-dapper-sqlite-api-xunit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/persteenolsen/dotnet-8-dapper-sqlite-api-xunit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/persteenolsen%2Fdotnet-8-dapper-sqlite-api-xunit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/persteenolsen%2Fdotnet-8-dapper-sqlite-api-xunit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/persteenolsen%2Fdotnet-8-dapper-sqlite-api-xunit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/persteenolsen%2Fdotnet-8-dapper-sqlite-api-xunit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/persteenolsen","download_url":"https://codeload.github.com/persteenolsen/dotnet-8-dapper-sqlite-api-xunit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/persteenolsen%2Fdotnet-8-dapper-sqlite-api-xunit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267972569,"owners_count":24174382,"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-07-30T02:00:09.044Z","response_time":70,"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":["dapper","dotnet","rest-api","sqlite","xunit"],"created_at":"2024-11-21T09:08:46.597Z","updated_at":"2026-05-06T01:32:53.166Z","avatar_url":"https://github.com/persteenolsen.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dotnet-8-dapper-sqlite-crud-api-xunit\n\n.NET + VS Code + xUnit - Setup Unit Testing and Code Coverage in ASP.NET Core\n\n# Last updated\n\n- 11-11-2024\n\n# Source code\ndotnet-8-dapper-sqlite-crud-api\n\n# .NET Version\n.NET 8\n\n# DB\nSQLite\n\n# ORM\nDapper\n\n# NuGet Packages with commands\n- dotnet add package AutoFixture\n- dotnet add package Moq\n- dotnet add package coverlet.msbuild\n\n# VS Code Extensions\n\n- NET Core Test Explorer\n- Coverage Gutters\n\n# Unit Tests\nxUnit\n\n# Coverage Reports\n\ndotnet tool install -g dotnet-reportgenerator-globaltool\n\n# Run tests and view the code coverage by VS Code\n\n- Run the Tests by open the .NET Test Explorer ( click the Testing tab in the left side of VS Code)\n\n- After the Tests pass there should be a generated code coverage file at /WebAPI.Tests/TestResults/\nlcov.info. The file contains coverage data and is not meant to be directly human readable\n\n- Now open the WebAPI/Services/UserService.cs class and enable Coverage Gutters by clicking Watch in the VS Code status bar. The gutter next to the line numbers should be green for covered lines and red for uncovered lines, and the status bar should show the percentage that the file is covered\n\n- By clicking in the WebAPI/Services/UserService.cs should show 42 % covered at the bottom of VS Code\n\n- Try click in the WebAPI/Entities/User.csfile which should show 100 % covered\n\n- Note: Also make sure to create or update the /.vscode/tasks.json file to generate an HTML coverage report based on the lcov.info file\n\n- Run the task by selecting: Terminal \u003e Run Task... \u003e generate coverage report\n\nThat is a setup to run unit tests and generate code coverage reports quickly and easily with VS Code for ASP.NET Core projects :-)\n\n\n# Run tests outside VS Code\n\n- First make sure to Right Click the folder WebAPI.Tests by Powershell or Promt and type dotnet restore\n\n- Then Right Click the folder WebAPI.Tests by Powershell or Promt and type dotnet test\n\n- The results of the Tests will be displayed \n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpersteenolsen%2Fdotnet-8-dapper-sqlite-api-xunit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpersteenolsen%2Fdotnet-8-dapper-sqlite-api-xunit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpersteenolsen%2Fdotnet-8-dapper-sqlite-api-xunit/lists"}