An open API service indexing awesome lists of open source software.

https://github.com/vitaliy-bezugly/ordersapi

A set of clean approaches based on cqrs (mediatR) to api development using the fictional example of customer orders
https://github.com/vitaliy-bezugly/ordersapi

api-rest asp-net-core cqrs mediatr sqlite unit-testing x-unit

Last synced: over 1 year ago
JSON representation

A set of clean approaches based on cqrs (mediatR) to api development using the fictional example of customer orders

Awesome Lists containing this project

README

          

# Orders api
A set of clean approaches based on cqrs (mediatR) to api development using the fictional example of customer orders

## 🧐 About app
The API describes a fictional example of creating product orders for a specific customer. The API, built using RESTful principles, allows you to perform CRUD operations on 3 data types: Customer, Product, and Order.

This project is based on ASP .NET Core using the MediatR library. The application uses Sqlite as a persistent data store. The main reasons for this are ease of implementation and no need for a SQL server, which is acceptable for a home project.
## 🚀 Deployment

This application has already been deployed to the web using the Heroku service.

Click it!

To use it as API add to the route api/v1/[ControllerName]

## 🛠️ Run Locally

Clone the project

```bash
git clone https://github.com/VitaliyMinaev/OrdersApi.git
```

Go to the project directory

```bash
cd OrdersApi
```

Start the server

```bash
dotnet run
```

## 🧿 Environment Variables

To run this project, you will need to add the following environment variables

`DatabaseCreated` - Responsible for the state of the data source, takes the value "true" if the database has already been created and the current state of the objects describes their representation in the database (no migrations are required) and "false" if the database requires a migration operation (recommended value for the first run)

## 💻‍‍ Libraries and frameworks with which the application was created



  • ASP .NET Core Web API - as backend framework

  • MediatR


  • Entity Framework Core - as ORM


  • Sqlite - as data storage


  • In Memory caching - with Scrutor


  • XUnit - as framework for testing

## 👨‍💻 Authors

- [@VitaliyMinaev](https://github.com/VitaliyMinaev)

## Screenshots

![image](https://user-images.githubusercontent.com/87979065/226611153-a8a57234-b0b5-4d47-b9b2-15b8f6be5fac.png)