This project is not in a complete or portfolio ready state, and should not be considered representiational of professional work.
- Git
- C#
- .NET 5.0
- ASP.NET Core
- Entity Framework Core
- RESTful Routing, CRUD
- MySQL & MySQL Workbench
- Swagger
- Postman
This is a C# API Framework application built to allow users to make API calls to find National and State parks in the United States. Furthermore, you can query this API by location (e.g. "Oregon") or type (e.g. "National").
- Requires Visual Studio Code Installation
- Requires Terminal Installation
- Open the terminal on your local machine
- Navigate to the directory inside of which you wish to house this project
- Clone this project with the following command
$ git clone <https://github.com/colchapm/Parks.Solution.git>
- Next you will need to download and install .NET Core through this link if you don't already have it: https://dotnet.microsoft.com/download
- After downloading and installing .NET Core, return to your terminal and navigate to the root directory by entering
$ cd Parks.Solution
- Open this project in Visual Studio Code with the command
$ code .
- Still in the terminal, navigate to the desired subdirectory of the repository with the command
$ cd Parks
- Retrieve and install packages listed in the .csproj files with the command
$ dotnet restore
- Create internal content for build with the command
$ dotnet build
- In Visual Studio Code, navigate to the
Parks
directory and create an appsettings.json file and input the following script (note the name of the database can be whatever you would like (e.g. collin_chapman_test)) - If you do not have MySQL Workbench, it can be downloaded here: https://dev.mysql.com/downloads/file/?id=484391
- Create Initial SQL migration with the following command
$ dotnet ef migrations add Initial
- _Update the database in MySQL Workbench with the following command
$ dotnet ef database update
(note this will title the database whatever you listed in your appsettings.json file (e.g. collin_chapman_test)) _ - _Back in the terminal, navigate to
$ cd Parks
and run the application with the command$ dotnet run
GET /api/parks
GET /api/parks/{id}
POST /api/parks
PUT /api/parks/{id}
DELETE /api/parks/{id}
This project also has an additional endpoint to find and return a random park from the database
GET /api/parks/random
GET /api/parks/?location=oregon
This project utilizes full swagger documentation that can be found here: https://app.swaggerhub.com/apis-docs/colchapm/ParksApi/0.1
No known bugs at this time
- Eventually have all National and State parks included in the database
- Create an MVC application that interacts with the API
This project is not hosted on GitHub Pages
Copyright (c) 2021 Collin Chapman
This software is licensed under the MIT license