Skip to content

Vaansh/.NET5-REST-API-Catalog

Repository files navigation


Catalog Api

A .NET 5 based Rest Api.
See the code »

Description

A REST API made using the .NET 5 framework – with GET, POST, PUT, DELETE endpoints to perform CRUD operations, as well as to practice important principles such as dependency injection, DTOs and to familiarize myself with the new .NET 5 framework. A docker image of the project was created.

Technologies practiced

C#, .NET 5 Framework, Dependency Injection, Postman, SwaggerUI, MVC, MongoDB, REST API, Docker, Kubernetes

Testing

Run the following two commands and test the endpoints on http://localhost:8080/items

docker run -d --rm --name mongo -p 27017:27017 -v mongodbdata:/data/db
-e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=Pass#word1
--network=CatalogNetwork mongo
docker run -it --rm -p 8080:80
-e MongoDbSettings:Host=mongo -e MongoDbSettings:Password=Pass#word1
--network=CatalogNetwork vaansh/catalog01:v1

1

Endpoints

  1. GET /items/{id}

    3

  2. POST /items

    7 8

  3. PUT /items/{id}

    9 10

  4. DELETE /items/{id}

    5 6

Releases

No releases published

Packages

No packages published