{"id":26291288,"url":"https://github.com/savaladaojr/commanderapi","last_synced_at":"2026-04-16T07:31:15.045Z","repository":{"id":234535265,"uuid":"289574997","full_name":"savaladaojr/CommanderAPI","owner":"savaladaojr","description":"It is a simple ASP.NET Core 3.1 MVC REST API that executes CRUD commands through the entity framework core. It also includes how to work with the Repository Pattern, Unit of Work, and SOLID principles. ","archived":false,"fork":false,"pushed_at":"2020-09-23T22:29:34.000Z","size":126,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-19T18:48:19.224Z","etag":null,"topics":["api-rest","asp-net-core","aspnetcore","automapper","csharp","dotnet","efcore","entity-framework","entity-framework-core","migrations","mvc","repository-pattern","rest-api","restful-api","sqlserver","vscode"],"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/savaladaojr.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}},"created_at":"2020-08-22T22:12:57.000Z","updated_at":"2024-04-19T18:48:23.818Z","dependencies_parsed_at":"2024-04-19T18:48:23.521Z","dependency_job_id":"c4800f3a-955a-461c-a9e6-76f5b1d1aeaf","html_url":"https://github.com/savaladaojr/CommanderAPI","commit_stats":null,"previous_names":["savaladaojr/commanderapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/savaladaojr%2FCommanderAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/savaladaojr%2FCommanderAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/savaladaojr%2FCommanderAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/savaladaojr%2FCommanderAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/savaladaojr","download_url":"https://codeload.github.com/savaladaojr/CommanderAPI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243668004,"owners_count":20328036,"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":["api-rest","asp-net-core","aspnetcore","automapper","csharp","dotnet","efcore","entity-framework","entity-framework-core","migrations","mvc","repository-pattern","rest-api","restful-api","sqlserver","vscode"],"created_at":"2025-03-15T00:36:59.201Z","updated_at":"2026-04-16T07:31:10.024Z","avatar_url":"https://github.com/savaladaojr.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Commander API\n\u003e Commander API is a simple ASP.NET Core 3.1 MVC REST API that executes CRUD (Create, Retrieve, Update and Delete) commands on an MS SQL Server Database using Entity Framework Core.\n\n![GitHub language count](https://img.shields.io/github/languages/count/savaladaojr/CommanderAPI)\n![GitHub top language](https://img.shields.io/github/languages/top/savaladaojr/CommanderAPI)\n![.NET Core](https://github.com/savaladaojr/CommanderAPI/workflows/.NET%20Core/badge.svg?branch=master)\n![GitHub issues](https://img.shields.io/github/issues/savaladaojr/CommanderAPI)\n![GitHub issues](https://img.shields.io/github/issues-raw/savaladaojr/commanderAPI)\n\n\u003cbr/\u003e\n\n## Description\nThe Commander API stores command line snippets (e.g. dotnet new mvc - to create a new ASP.NET Core Web Application). \nIt is a simple but useful tool when you need to find a specific command line to use it. So, you'll have it within your reach, quickly and without having to perform any search on Google ;).\n\nEach command line will have the following attributes:\n\n- How to\u003cbr/\u003e\nDescription of what the command will do, e.g. Build a .NET the project\n\n- Command line\u003cbr/\u003e\nThe actual command line snippet, e.g. dotnet build\n\n- Platform\u003cbr/\u003e\nApplication or platform domain, e.g. .Net Core\n\n\n### Features\n\n- [X] Retrieve all commands\n- [X] Retrieve a spectic command\n- [X] Create a new command\n- [X] Update a command information\n- [X] Delete an existent command\n\n\u003cbr/\u003e\nAs the most REST APIs, the Commander API will follow the standard set of methods to Create, Retrieve, Update, and Delete records in the database. So, each functionality could be access as listed in the table below:\n\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth\u003eVerb\u003c/th\u003e\n      \u003cth\u003eURI\u003c/th\u003e\n      \u003cth\u003eMethod\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eGET\u003c/td\u003e\n      \u003ctd\u003e/api/commands\u003c/td\u003e\n      \u003ctd\u003eRetrieve\u003c/td\u003e\n      \u003ctd\u003eRetrieve all command line\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eGET\u003c/td\u003e\n      \u003ctd\u003e/api/commands/{id}\u003c/td\u003e\n      \u003ctd\u003eRetrieve\u003c/td\u003e\n      \u003ctd\u003eRetrieve a single resource, (by Id)\u003c/td\u003e\n    \u003c/tr\u003e    \n    \u003ctr\u003e\n      \u003ctd\u003ePOST\u003c/td\u003e\n      \u003ctd\u003e/api/commands\u003c/td\u003e\n      \u003ctd\u003eCreate\u003c/td\u003e\n      \u003ctd\u003eCreate a new command line\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ePUT\u003c/td\u003e\n      \u003ctd\u003e/api/commands/{id}\u003c/td\u003e\n      \u003ctd\u003eUpdate\u003c/td\u003e\n      \u003ctd\u003eUpdate a single command line by Id\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eDELETE\u003c/td\u003e\n      \u003ctd\u003e/api/commands/{id}\u003c/td\u003e\n      \u003ctd\u003eDelete\u003c/td\u003e\n      \u003ctd\u003eDelete a single command line by Id\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\n## Installation\n\n### Pre-requisites\n\n1. .Net Core SDK installed;\n2. Visual Studio Code installed;\n3. Microsoft SQL Server Local DB installed;\n4. MS SQl Server - VSCode Extension - installed.\n\n### Cloning the Repository\n\n1. Create a project's directory on your computer;\n2. Clone the repository.\n\n```bash\ngit clone https://github.com/savaladaojr/CommanderAPI\n```\n\n## Running the API\n\n#### Opening the project\n\n1. On the director that you clone the repository, by a command prompt, execute the command to open the Visual Sutdio Code and load the project folder.\nYou should see something like the screenshot below.\n\n```sh\ncode .\n```\n\n\u003cimg alt=\"Visual Studio Code - Project's structure\" title=\"CommanderAPI\" src=\"./Assets/visualstudiocode_project.png\" /\u003e\n\n### Restoring project's dependencies\n\n1. In the Visual Studio Code, open a *Terminal* and run the command to restore all packages used by the API;\n\n```sh\ndotnet restore\n```\n\n### Updating the Database\n\n1. Connect on the SQL Server Local DB:\u003cbr/\u003e\n1.1. Create a new database \"CommanderDB\";\u003cbr/\u003e\n1.2. Create new user called \"CommanderUser\", set it password and set it as a CommanderDB owner;\u003cbr/\u003e\n\n2. In the VSCode:\u003cbr/\u003e\n2.1. Open the file *\"appsettings.json\"* and change the *\"ConnectionString\"* property to reflect your configuration;\u003cbr/\u003e\n2.2. Open a new Terminal and run the command to update the database with the project's database migrations.\u003cbr/\u003e\n\n```sh\ndotnet ef database update\n```\n\n### Building \u0026 Runnin the API\n\n1. Then rebuild the application;\n\n```sh\ndotnet build\n```\n\u003cimg alt=\"Visual Studio Code - Project's structure\" title=\"CommanderAPI\" src=\"./Assets/visualstudiocode_project_build_results.png\" /\u003e\n\n2. Run the API.\n\n```sh\ndotnet run\n```\n\u003cimg alt=\"Visual Studio Code - Project's structure\" title=\"CommanderAPI\" src=\"./Assets/visualstudiocode_project_run_results.png\" /\u003e\n\n\n## Consuming the API.\n\nTo run some tests on the API, I recommend that you download [Postman](https://www.postman.com/downloads/) or also use a Google Chrome plug-in. You also have another option which is [Insomina](https://insomnia.rest/download/). Both are gonna work and have a free version.\n\nI'm using Postman! So I have already prepared a file with all requests for the API. You can find this file (Commands API.postman_collection.json) in the repository.\n\nExemple of a request to the API:\n\u003cimg alt=\"Visual Studio Code - Project's structure\" title=\"CommanderAPI\" src=\"./Assets/visualstudiocode_project_run_results.png\" /\u003e\n\n\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\n\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/savaladaojr/CommanderAPI/fork\u003e);\n2. Create your feature branch (e.g. `git checkout -b feature/fooBar`);\n3. Commit your changes (e.g. `git commit -am 'Add some fooBar'`);\n4. Push to the branch (e.g. `git push origin feature/fooBar`);\n5. Create a new Pull Request.\n\n\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\n###### This API was built for learning purposes. I did follow the instructions from the \u003ca href='https://dotnetplaybook.com/develop-a-rest-api-with-net-core/'\u003eDotnetplaybook\u003c/a\u003e website.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsavaladaojr%2Fcommanderapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsavaladaojr%2Fcommanderapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsavaladaojr%2Fcommanderapi/lists"}