SolSQL API is a RESTful service built on ASP.NET Core 8 with a MySQL backend. Every database operation runs through MySQL stored procedures — controllers never issue raw EF queries directly against tables. This design centralizes business logic in the database layer and keeps controller code thin.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jparra-amell/api_solsql/llms.txt
Use this file to discover all available pages before exploring further.
Technology stack
| Component | Technology |
|---|---|
| Runtime | ASP.NET Core 8 (.NET 8) |
| Database | MySQL (Pomelo EF Core provider) |
| ORM | Entity Framework Core 8 (FromSqlInterpolated) |
| Password hashing | BCrypt.Net |
| API docs | Swagger / OpenAPI (Swashbuckle) |
| Containerization | Docker |
Key services configured in Program.cs
The following services are registered inProgram.cs before builder.Build() is called:
| Service | Registration method | Purpose |
|---|---|---|
| Controllers | AddControllers() | Registers all [ApiController] routes |
| Swagger / OpenAPI | AddEndpointsApiExplorer() + AddSwaggerGen() | Generates the interactive API explorer |
| MySQL / EF Core | AddDbContext<ContextDB>() | Provides the ContextDB dependency to every controller |
| CORS | AddCors() with "AllowAll" policy | Permits cross-origin requests from any client |
| Response caching | AddResponseCaching() | Enables HTTP response cache headers |
Stored procedure pattern
Controllers call stored procedures through EF Core’sFromSqlInterpolated method rather than querying DbSet properties with LINQ. For example, the login endpoint executes:
CORS policy
The"AllowAll" CORS policy is registered and applied globally:
AllowAnyOrigin() with a specific origins list.
Response caching
Response caching middleware is registered and enabled:[ResponseCache] attributes to actions. Caching reduces repeated database load for read-heavy endpoints.
Swagger UI
Swagger is available at/swagger in all environments. The endpoint is configured as:
http://<host>/swagger to browse all endpoints interactively and send test requests without a separate API client.
HTTPS redirection (
UseHttpsRedirection) is commented out in Program.cs. If you deploy behind a TLS-terminating proxy (such as nginx or a cloud load balancer), the proxy handles HTTPS and the API can remain on HTTP internally.Docker deployment
The project includes Docker support. You can build and run the API in a container, which bundles the .NET runtime and application together. Set theConnection_mysql connection string in your environment or Docker Compose configuration to point to your MySQL instance.