Skip to content

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

Notifications You must be signed in to change notification settings

vitaliy-bezugly/OrdersApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

Go to the project directory

  cd OrdersApi

Start the server

  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

Screenshots

image

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published