caner-aras / OnionArquitecture_Redis

Basic Onion architecure RESTful service implementing CQRS, FluentValidation, Ardalis, Identity framework Core, JWT and Redis Cache

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Net Core 5 Basic Restful application based on Onion Architecture with Redis Cache

Basic RESTful project based on Onion architecture using Redis Cache, Ardalis (repository package that implemenets all necessary methods), Fluent validation and JWT for security.

Installation

Pretty straightforward, just modify the appsettings.json file located on WebAPI project under Presentation folder by replacing your database connection.

"ConnectionStrings": {
    "DefaultConnection": "Data Source=YOUR_CONNECTION;Initial Catalog=OnionExampleDb;Integrated Security=True;MultipleActiveResultSets=True",
    "IdentityConnection": "Data Source=YOUR_CONNECTION;Initial Catalog=OnionExampleIdentityDb;Integrated Security=True;MultipleActiveResultSets=True"
  }

Usage

  1. Set the WebAPI project as the main project on the presentation folder
  2. After changing the connectionString you need to execute a migration, do this by opening "Console package administrator" then selecting "Persistence" as default project, finally applyi the following commands:
add-migration Initial
update-database
  1. To run Redis Cache you need to download the latests build by going to this repo:
https://github.com/microsoftarchive/redis/releases/tag/win-3.0.504

To run redis, just extract the package, then execute redis-server.exe and minimize the window. You can also test if redis is running without issues by executing "redis-cli.exe" and sending the command "ping", you should receive "pong" as a response, then close the client window.

$ redis-cli ping
PONG

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

Basic Onion architecure RESTful service implementing CQRS, FluentValidation, Ardalis, Identity framework Core, JWT and Redis Cache


Languages

Language:C# 100.0%