Перейти к содержимому

Building a Task Management API | Part 2: Controllers & Routing in ASP.NET Core

BackendWithCSharp

0:00 / 0:00

Building a Task Management API | Part 2: Controllers & Routing in ASP.NET Core

86 просмотров · 3 недели назад
BackendWithCSharp
90 подписчиков
86 просмотров · 3 недели назад
Welcome to Part 2 of our *Task Management API* project series with ASP.NET Core Web API. In this episode, we're going deeper into *Controllers and Routing* and understanding what actually happens when an HTTP request reaches our API. For example, when a client sends: `GET /api/tasks/10` How does ASP.NET Core know which Controller should handle the request? And how does it know which Action to execute? In this video, we'll cover: What Controllers and Actions are How Routing works in ASP.NET Core `[Route]` and `[HttpGet]` Route Templates Route Parameters such as `{id}` How `[controller]` works How HTTP methods affect endpoint selection How ASP.NET Core matches a request to an endpoint The difference between `GET`, `POST`, `PUT`, and `DELETE` How Controller-level and Action-level routes work How Swagger represents our API endpoints Common routing mistakes and examples We'll also build and test different endpoints in our Task Management API, including: `GET /api/tasks` `GET /api/tasks/{id}` `POST /api/tasks` `PUT /api/tasks/{id}` `DELETE /api/tasks/{id}` This episode focuses on understanding **how routing works**, not implementing the full CRUD logic yet. In the next part, we'll start implementing the actual CRUD operations and learn how ASP.NET Core handles data sent from the client using **Model Binding**. If you're learning ASP.NET Core Web API through a real project, make sure to follow the series from Part 1. In this channel, you will learn practical backend development concepts using .NET and C#. This channel covers real-world topics including: .NET, C#, microservices architecture, Docker, backend development, testing, databases, clean architecture and system design. Subscribe for more professional backend and .NET tutorials. LinkedIn: www.linkedin.com/in/hossein-tavakkoli #ASPNetCore #WebAPI #CSharp #DotNet #backenddevelopment #backendpro #HosseinTavakkoli #backendproinstagram #asonetcorewebapi #webapi #csharpdevelopers