{"id":16721295,"url":"https://github.com/anishkny/dotnet-minimal-api-example","last_synced_at":"2026-05-08T08:34:19.822Z","repository":{"id":190512600,"uuid":"682782852","full_name":"anishkny/dotnet-minimal-api-example","owner":"anishkny","description":"ASP.NET Minimal API Tutorial with Postman tests and code coverage","archived":false,"fork":false,"pushed_at":"2024-04-15T04:30:14.000Z","size":1098,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-24T02:43:39.872Z","etag":null,"topics":["coverage","csharp","dotnet","postman"],"latest_commit_sha":null,"homepage":"https://learn.microsoft.com/en-us/aspnet/core/tutorials/min-web-api","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/anishkny.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-08-24T23:13:02.000Z","updated_at":"2024-04-29T05:28:43.019Z","dependencies_parsed_at":"2023-11-20T05:29:55.150Z","dependency_job_id":"5513c9f2-63b4-4104-9ff7-b7daba67d8fa","html_url":"https://github.com/anishkny/dotnet-minimal-api-example","commit_stats":null,"previous_names":["anishkny/dotnet-minimal-api-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anishkny%2Fdotnet-minimal-api-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anishkny%2Fdotnet-minimal-api-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anishkny%2Fdotnet-minimal-api-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anishkny%2Fdotnet-minimal-api-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anishkny","download_url":"https://codeload.github.com/anishkny/dotnet-minimal-api-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243727451,"owners_count":20337999,"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":["coverage","csharp","dotnet","postman"],"created_at":"2024-10-12T22:29:43.674Z","updated_at":"2026-05-08T08:34:14.796Z","avatar_url":"https://github.com/anishkny.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# .NET Minimal API Example\n\n[![CI](https://github.com/anishkny/dotnet-minimal-api-example/actions/workflows/ci.yml/badge.svg)](https://github.com/anishkny/dotnet-minimal-api-example/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/anishkny/dotnet-minimal-api-example/graph/badge.svg)](https://codecov.io/gh/anishkny/dotnet-minimal-api-example)\n\nThis repository follows along and implements this tutorial: [Create a minimal API with ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/tutorials/min-web-api?view=aspnetcore-7.0\u0026tabs=visual-studio-code).\n\n\u003e Minimal APIs are architected to create HTTP APIs with minimal dependencies. They are ideal for microservices and apps that want to include only the minimum files, features, and dependencies in ASP.NET Core.\n\n## Getting Started\n\n### Prerequisites\n\n- [.NET SDK](https://dotnet.microsoft.com/download) (Version 7 or later)\n- [Node.js](https://nodejs.org/en/) (Version 18 or later)\n- [PostgreSQL](https://www.postgresql.org/) (Version 15 or later)\n\n### Installation\n\n1. Clone this repository\n\n```bash\ngit clone https://github.com/anishkny/dotnet-minimal-api-example.git\n```\n\n2. Install dependencies\n\n```bash\ncd dotnet-minimal-api-example\nnpm install\n```\n\n### Usage\n\n1. Start a PostgreSQL server\n\n```bash\ndocker run -p 5432:5432 -e 'POSTGRES_PASSWORD=password' postgres:15-alpine\n```\n\nAlternately, you can specify a custom environment variable `POSTGRES_CONNECTION_STRING` to connect to a PostgreSQL server running elsewhere.\n\n2. Run the application\n\n```bash\nnpm run build\nnpm run start\n```\n\n3. Open a browser and navigate to [http://localhost:5000/todoitems](http://localhost:5000/todoitems)\n\n### Migrations\n\nIf you make changes to the database models, you will need to generate a new migration and apply it to the database.\n\n```bash\ndotnet ef migrations add -o migrations \u003cmigration-name\u003e\n```\n\nAll migrations are stored in the [`src/migrations`](./src/migrations) directory.\n\n### Running Tests\n\n```bash\nnpm run start-and-test\n```\n\n### Postman Collection\n\nIncluded is a Postman collection that can be used to test the API. You can import the collection by opening Postman and clicking on `File \u003e Import...` and selecting the [`api-tests.postman_collection.json`](./api-tests.postman_collection.json) file.\n\n![Postman Collection](./postman.png)\n\nIt is also used for automated testing via the `newman` tool.\n\n### Coverage\n\nAfter running the test suite, you can view the code coverage report by opening the `coveragereport/index.htm` file in a web browser.\n\n## License\n\nThis project is licensed under the [MIT License](https://opensource.org/license/mit/) - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanishkny%2Fdotnet-minimal-api-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanishkny%2Fdotnet-minimal-api-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanishkny%2Fdotnet-minimal-api-example/lists"}