.NET Course — GameCode
ASP.NET Core powers banking and major corporations across LATAM—alongside Angular and Spring Boot, it's where juniors get hired most. Build real REST APIs with .NET 8 and C# 12—endpoints, dependency injection, Entity Framework, validation, authentication, and testing—guided by Sutrax, the Contract Assembler.
From Parchment to Workshop
What is .NET 8 and what changes from what you learned
Install .NET 8 SDK and dotnet CLI
Top-level statements: Modern C# 12
Active Review: Methods and Collections
Active Review: Classes, Inheritance, and Interfaces
Namespaces, using and multi-file projects
The Missing Pieces
Lambda Expressions
Func and Action: storing behavior in variables
LINQ: Where and Select
LINQ: OrderBy, First, Any, Count
records: immutable data pieces
Records: Value Equality and with Expressions
switch expressions and pattern matching
The First Window
How the web works: client, server, HTTP, and JSON
WebApplication: Starting the Server
app.MapGet: the first route
Returning Objects: Automatic JSON
Route Parameters: /piezas/{id}
Query strings: ?key=value
MapPost: Receive a JSON Body
Status Codes with Results
The Workshop Receptionists
First controller: [ApiController] and [Route]
[HttpGet] with route and query parameters
ActionResult: Ok() and NotFound()
[HttpPost] and CreatedAtAction
[HttpPut]: replace a resource
[HttpDelete] and 204 NoContent
Complete CRUD with In-Memory Storage
REST Conventions: [Route("api/[controller]")]
The Hall of Contracts
The Problem of Coupled Code
Interfaces as Architecture Contracts
Multiple Pieces, One Contract
Services: Business Logic Outside the Controller
The Container: builder.Services.AddScoped
Constructor Injection
Lifetimes: Singleton, Scoped, and Transient
Implementation Swap: Change Only the Registry
Layers: controller → service → repository
The Vault of Pieces
What is a Database and What is an ORM
Entity and DbContext
Saving: Add and SaveChanges
Read: ToList and Find
LINQ Against the Base: Where on the DbSet
Update and Delete: Update and Remove
The real repository: EF behind the contract
Relationships: One to Many with Include
Migrations: Evolving the Schema
The Inspector of Pieces
DTOs: What Goes In and What Comes Out
Map DTO ↔ Entity
[Required] and [StringLength]: the automatic 400
[Range] and [EmailAddress]: numeric and format rules
ProblemDetails: the standard error format
Domain Exceptions
Global Exception Handling: IExceptionHandler
Business Rules in the Service: the 409
The Seals of Identity
Authentication vs Authorization
Password Hashing: PasswordHasher
User Registration: POST /registro
Login and JWT Issuance
[Authorize]: protect endpoints
Claims: Reading the Token Identity
Roles: [Authorize(Roles = "admin")]
The Chamber of Trials
First Test: [Fact] and Assert.Equal
[Theory] and [InlineData]: one test, many cases
Assert.Contains, Assert.True and Assert.Throws
Handmade Fakes: Testing an Isolated Service
Testing endpoints with WebApplicationFactory
Persistence Tests with Sqlite
TDD: the test before the piece
The Hidden Mechanisms
async and await: waiting without blocking
EF Core Async: ToListAsync and SaveChangesAsync
The middleware pipeline: app.Use
Middleware in a class: measuring every response
ILogger: logging what happens
Configuration: appsettings.json and IConfiguration
Environments: Development and Production
CORS: who can call your API
Publishing a .NET API: dotnet publish, Docker, and the cloud
The Grand Masterwork of the Assembler
Modeling: Entities, DTOs, and Contracts
Persistence: DbContext and Repositories
Services: the business rules
Controllers: the complete CRUD of two resources
Validation and Global Errors
Security: registration, login, and protected routes
Search, Filters and Pagination
Final Delivery: async, logging, and polish