Skip to content

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

Notifications You must be signed in to change notification settings

gonzdn/OnionArquitecture_Redis

Repository files navigation

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages