Basic RESTful project based on Onion architecture using Redis Cache, Ardalis (repository package that implemenets all necessary methods), Fluent validation and JWT for security.
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"
}
- Set the WebAPI project as the main project on the presentation folder
- 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
- 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
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.