This is a RESTful API built with .NET Core and Entity Framework Core that allows managing movies, categories, and users. It includes authentication and authorization via JWT and .NET Identity. This project is designed as a review of advanced ASP.NET Core concepts and best practices for building professional APIs.
- Full CRUD for Movies, Categories, and Users.
- Authentication and authorization handling using JWT and .NET Identity.
- Implementation of Service Layer for separated business logic.
- Global Middleware for handling custom errors.
- AutoMapper for mapping entities and DTOs.
- Swagger configured for automatic API documentation.
- Dependency configuration with Dependency Injection (DI).
- .NET Core 8.0
- Entity Framework Core
- AutoMapper
- Swagger
- JWT (JSON Web Tokens)
- .NET Identity
- SQL Server
- C# (Async/Await, Generics, Dependency Injection)
- ApiPeliculas: Main project containing all the API logic.
Controllers/
: Route controllers.Services/
: Business logic organized in layers (Service Layer).Repositories/
: Data access with generic and specific Repositories.Extensions/
: Configuration of Swagger, JWT, and Identity separated fromProgram.cs
.Entities/
: Models and DTOs used in the application.Migrations/
: Entity Framework Core migrations.
- Clone the repository:
git clone git@github.com:jam300/ApiPeliculas_NetCore.git
- Restore NuGet packages:
dotnet restore
- Configure the database connection in
appsettings.json
:
"ConnectionStrings": {
"ConexionSql": "Server=(localdb)\\MSSQLLocalDB;Database=ApiPeliculasDB;Trusted_Connection=True;"
}
- Apply Migrations:
dotnet ef database update
- Run the application:
dotnet run
- Access Swagger:
https://localhost:5001/swagger/index.html
- Categories: Full CRUD.
- Movies: Full CRUD and advanced search.
- Users: Registration, Login, and JWT authentication.
MIT License
Created by Javier Adan Mendez Mendez as part of an advanced .NET Core review.