AJReade / .NETCore_MVC_RESTAPI

With the plethora of CLI commands to learn, it is helpful to have an API which returns us commands that we often forget. (C#, ASP.NET Core, MVC, SQL Server, REST API)

Home Page:http://commanderapi.canadacentral.azurecontainer.io/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLI Commands REST API (ASP.NET Core MVC)

Site link: http://commanderapi.canadacentral.azurecontainer.io/index.html (if it's down it means I unfortunately ran out of Azure credits...)

With the plethora of CLI commands to learn, it is helpful to have an API which returns us commands that we often forget. This Commands API stores command line snippets along with a short description of what it does, as well as which platform it's for.

The purpose of this project is to learn and practice concepts related to:

  • Building a REST API
  • .NET Core
  • MVC Architectural Pattern
  • C#

More specifically, I used the following:

  • Dependency injection
  • Repository design pattern
  • SQL Server Express & SSMS
  • Entity Framework Core O/RM (DBContext, Migration)
  • Data Transfer Objects (DTOs) & AutoMapper
  • RESTful API guidelines
  • HTTP (GET, POST, PUT, PATCH, DELETE, status codes)
  • Views (Razor, Shared Layout, ViewBag, RenderSection)
  • Testing API Endpoints (SwaggerUI & Postman)
  • Docker (Container, Image, Deploying on Docker Hub)
  • Microsoft Azure (Deployment: Docker Image + SQL Database)

Note: Please excuse the large amount of comments in my code, they are used as notes for later review.

Application Architecture:

image

Website Look:

image

API Endpoints (CRUD):

image

Sample endpoints using Postman:

[HttpPost] Creates a new command, returns Location header with link to resource, as well as the '201 Created' status code.

image

[HttpPatch] Updates the value of the howTo attribute and returns the '204 No Content' status code.

image

About

With the plethora of CLI commands to learn, it is helpful to have an API which returns us commands that we often forget. (C#, ASP.NET Core, MVC, SQL Server, REST API)

http://commanderapi.canadacentral.azurecontainer.io/index.html


Languages

Language:C# 97.6%Language:Dockerfile 2.4%