An Opinionated, Maintainable REST API Architecture for ASP.NET Core
summary
Argues for a concrete REST pattern: controllers only route, requests use distinct DTOs not entities, validation moves to FluentValidation, business logic lives in request handlers wired via MediatR, mapping uses AutoMapper, and dependency injection (Autofac suggested) registers handlers and validators in Startup.cs. Shows a Create flow that returns the new ID, describes a BaseService that runs validators, and emphasizes unit tests and separate versioned assemblies. Applies to ASP.NET Core and legacy Web API and claims improved maintainability and testability.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 2:01Scaffolding in ASP.NET Core
- 5:37Understanding project setup
- 10:04The scaffolded controller
- 14:48The pitfalls of scaffolding
- 19:11Refactoring data models
- 23:36Implementing validation
- 28:32Mediator pattern
- 35:15Dependency injection
- 39:27Controller refactoring
- 42:34Conclusion and Q&A
related talks
01h 01mAn Opinionated Approach to Using ASP.NET Core
56mAn Opinionated Approach to ASP.NET Core
01h 01mNever RESTing – RESTful API Best Practices using ASP.NET Web API
56mAn Opinionated Approach to ASP.NET Core
57mAn Opinionated Approach to ASP.NET Core
59mAn Opinionated Approach to ASP.NET Core
59mClean Architecture With ASP.NET Core
01h 03mASP.NET Core 1: What has changed for MVC and Web API developers?
