And I attempted to bootstrap the app with a mysql database.... using the MySqlConnector Nuget Package...
git clone https://github.com/propenster/NetCoreBlogApi.git netcoreapi
cd netcoreapi
Navigate to the src\BlogPostApi folder
Bootstrap the database using the dump db of the blogapi (blogapi.sql) in the resources folder of this repo
#### Step 4.1: Change the DefaultConnection settings in appsettings.json file in source folder...see below
"AllowedHosts": "*", "ConnectionStrings": { "DefaultConnection": "server=127.0.0.1;user id={root or HostName};password={password};port=3306;database=blogapi;" }
Using the dotnet cli dotnet run
The App is served at http://localhost:5000/api/blog OR https://localhost:5001/api/blog
POST https://localhost:5001/api/blog { "Title": "One", "Content": "First Blog Post!" }
POST https://localhost:5001/api/blog { "Title": "Two", "Content": "Second Blog Post!" }
POST https://localhost:5001/api/blog { "Title": "Three", "Content": "Third Blog Post!" }
GET https://localhost:5001/api/blog // Output: [ { "id": 3, "title": "Three", "content": "Third Blog Post!" }, { "id": 2, "title": "Two", "content": "Second Blog Post!" }, { "id": 1, "title": "One", "content": "First Blog Post!"} ]