application service
A class that carries out one use case by applying business rules and coordinating repositories and other services.
In more detail
In the course the endpoint owns HTTP details, the service owns business rules, and the repository owns persistence. Controllers and minimal APIs share the same services.
Related terms
- repository pattern — Putting all the code that reads and writes one kind of data behind a single object, so the rest of the app never talks to the database directly.
- controller — In ASP.NET Core, a class deriving from ControllerBase that groups related HTTP endpoints as methods called actions.
- minimal API — An ASP.NET Core style that declares each route and its handler together, as in app.MapGet("/api/ping", () => Results.Ok("catalog")).
Taught in
- Comparing Controllers and Minimal APIs — Modern .NET Core, C# & Enterprise Microservices
- The Repository Pattern — Modern .NET Core, C# & Enterprise Microservices
- Unit Testing with xUnit and NSubstitute — Modern .NET Core, C# & Enterprise Microservices