{"id":19519146,"url":"https://github.com/rahulmule/dotnet-webapi-cosmosdb","last_synced_at":"2026-05-15T13:02:57.446Z","repository":{"id":233185284,"uuid":"786250056","full_name":"RahulMule/DotNet-WebAPI-CosmosDB","owner":"RahulMule","description":"This project demonstrates how to use Azure Cosmos DB in a .NET 8 Web API using Entity Framework Core.","archived":false,"fork":false,"pushed_at":"2024-04-13T22:54:13.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-10T20:17:34.351Z","etag":null,"topics":["cosmosdb","csharp","dotnet","dotnet-webapi","efcore","rest-api","webapi"],"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/RahulMule.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-04-13T21:49:14.000Z","updated_at":"2024-04-13T22:49:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"f61791f7-7c30-44f0-9641-7699ca7bd733","html_url":"https://github.com/RahulMule/DotNet-WebAPI-CosmosDB","commit_stats":null,"previous_names":["rahulmule/dotnet-webapi-cosmosdb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RahulMule/DotNet-WebAPI-CosmosDB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulMule%2FDotNet-WebAPI-CosmosDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulMule%2FDotNet-WebAPI-CosmosDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulMule%2FDotNet-WebAPI-CosmosDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulMule%2FDotNet-WebAPI-CosmosDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RahulMule","download_url":"https://codeload.github.com/RahulMule/DotNet-WebAPI-CosmosDB/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulMule%2FDotNet-WebAPI-CosmosDB/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011057,"owners_count":26084865,"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-10-12T02:00:06.719Z","response_time":53,"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":["cosmosdb","csharp","dotnet","dotnet-webapi","efcore","rest-api","webapi"],"created_at":"2024-11-11T00:16:34.238Z","updated_at":"2025-10-12T10:42:03.785Z","avatar_url":"https://github.com/RahulMule.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# .NET 8 Web API with Azure Cosmos DB using EF Core\n\nThis project demonstrates how to use Azure Cosmos DB in a .NET 8 Web API using Entity Framework Core.\n\n## Project Structure\n\nThe project is structured into several classes:\n\n- `Game`: This is the model class that represents a game.\n- `GameContext`: This is the DbContext class that represents the session with the database. It allows querying and saving instances of the `Game` class.\n- `IGamesRepo`: This is the interface that defines the contract for the repository.\n- `GamesRepository`: This is the class that implements the `IGamesRepo` interface.\n- `Program`: This is the main entry point for the application.\n\n## Setup\n\nTo run this project, you need to have .NET 8 and Azure Cosmos DB.\n\n1. Clone this repository.\n2. Open the project in your favorite editor (e.g., Visual Studio, Visual Studio Code).\n3. Update the `CosmosDB:URL` and `CosmosDB:AccessKey` in the `appsettings.json` file with your Azure Cosmos DB settings.\n4. Run the project.\n\n## Usage\n\nThe API exposes several endpoints that correspond to CRUD operations:\n\n- `POST /api/games`: Create a new game.\n  ```json\n  {\n      \"GameId\": \"1\",\n      \"Name\": \"Call of Duty: Warzone\",\n      \"Description\": \"Call of Duty: Warzone was a free-to-play battle royale video game developed by Raven Software and Infinity Ward and published by Activision\",\n      \"Type\": \"Shooter\"\n  }\n- `GET /api/games/{id}`: Get a game by ID.\n- `GET /api/games`: Get all games.\n- `DELETE /api/games/{id}`: Delete a game by ID.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulmule%2Fdotnet-webapi-cosmosdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahulmule%2Fdotnet-webapi-cosmosdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulmule%2Fdotnet-webapi-cosmosdb/lists"}