This project is a lightweight, scalable HTTP API built on .NET 9 and ASP.NET Core. It leverages an in-memory caching layer powered by Redis to speed up responses, and includes Swagger/OpenAPI support for quick exploration and testing of its endpoints.
- 🗃️ Redis in-memory caching
- 📄 Swagger/OpenAPI documentation
- 🐘 PostgreSQL database support
| Technology | Description |
|---|---|
| .NET 9 | Core platform for the API |
| ASP.NET Core | Web framework |
| StackExchange.Redis | Redis client for .NET |
| Swagger / OpenAPI | API documentation and testing interface |
| PostgreSQL | Relational database management system |
Redis.API.sln
├── 📁 Redis.WebAPI/
│ ├── Controllers
│ ├── API
│ ├── DiContainer
│ └── Program.cs
│
├── 📁 Redis.Application/
│ ├── DTO
│ ├── Abstract
│ ├── Services
│ └── Configuration
│
├── 📁 Redis.Domain/
│ └── Entities
│
├── 📁 Redis.Infrastructure/
│ ├── Abstract
│ ├── Migrations
│ ├── Repositories
│
├── 📁 Redis.Persistence/
│ ├── Context
# Clone the repository
git clone https://github.com/mehmetcanari/dotnet-redis-api.git
cd dotnet-redis-api
dotnet restore
cd Redis.WebAPI
dotnet watch runAfter running the API, you can explore and test all endpoints through the Swagger UI interface.
Swagger UI: http://localhost:5001/swagger
@baseUrl = http://localhost:5001/api
POST {{baseUrl}}/player/create
Content-Type: application/json
{
"nickname": "Player1092",
"country": "TR"
}
###
GET {{baseUrl}}/player
###
GET {{baseUrl}}/player/1
###
PUT {{baseUrl}}/player/1
Content-Type: application/json
{
"nickname": "Player1092",
"country": "TR"
}
###
DELETE {{baseUrl}}/player/1Project Owner - bsn.mehmetcanari@gmail.com