# Minimal APIs (.NET) > Route handlers, parameter binding, filters, OpenAPI, route groups, hiệu năng - 18 câu hỏi phỏng vấn - Mid-Level - [Câu hỏi phỏng vấn: .NET](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van.md) ## 1. Minimal API trong ASP.NET Core là gì? **Câu trả lời** Minimal API là một cách tiếp cận đơn giản hóa để tạo HTTP API trong ASP.NET Core, được giới thiệu cùng với .NET 6. Chúng cho phép định nghĩa endpoint trực tiếp trong Program.cs mà không cần controller hay cấu hình phức tạp. Cách tiếp cận này giảm boilerplate code và cải thiện hiệu năng cho các API từ đơn giản đến phức tạp vừa phải, đồng thời mang lại trải nghiệm phát triển hiện đại và mang tính hàm hơn. ## 2. Phương thức nào cho phép định nghĩa một endpoint GET trong Minimal API? **Câu trả lời** MapGet là phương thức chuyên dụng để đăng ký một endpoint HTTP GET trong Minimal API. Nó nhận tham số là route pattern và một delegate định nghĩa logic xử lý. Phương thức này thuộc nhóm các phương thức Map* cũng bao gồm MapPost, MapPut, MapDelete và MapPatch cho các HTTP verb khác. ## 3. Làm thế nào để binding một route parameter trong endpoint Minimal API? **Câu trả lời** Parameter binding cho route parameter trong Minimal API được thực hiện tự động theo quy ước đặt tên. Chỉ cần định nghĩa một tham số trong route pattern giữa dấu ngoặc nhọn, sau đó khai báo một tham số cùng tên trong chữ ký của handler. ASP.NET Core tự động thực hiện binding và chuyển đổi kiểu. Ví dụ, với pattern /users/{id}, một tham số int id sẽ được tự động binding và chuyển đổi. ## Còn 15 câu hỏi nữa - Sự khác biệt giữa Results và TypedResults trong Minimal API là gì? - Làm thế nào để inject một service vào handler của Minimal API? Đăng ký miễn phí: https://sharpskill.dev/vi/login ## Các chủ đề phỏng vấn .NET khác - [Cơ bản về C#](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/csharp-basics.md): 25 câu hỏi, Junior - [LINQ & Delegates](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/csharp-linq-delegates.md): 20 câu hỏi, Junior - [Kiến thức cốt lõi ngôn ngữ C#](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/csharp-language-essentials.md): 15 câu hỏi, Junior - [Kiến thức cơ bản về ASP.NET Core](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/aspnet-core-fundamentals.md): 18 câu hỏi, Junior - [Vòng đời request trong ASP.NET Core](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/aspnet-core-request-lifecycle.md): 20 câu hỏi, Junior - [Configuration & Settings](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/configuration-settings.md): 20 câu hỏi, Junior - [Vòng đời ứng dụng](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/application-lifecycle.md): 20 câu hỏi, Junior - [Dependency Injection](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/dependency-injection.md): 24 câu hỏi, Mid-Level - [Entity Framework Core](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/entity-framework-core.md): 25 câu hỏi, Mid-Level - [Phát triển Web API](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/web-api-development.md): 22 câu hỏi, Mid-Level - [Async trong ASP.NET Core](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/async-aspnet-core.md): 20 câu hỏi, Mid-Level - [Authentication & Authorization](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/authentication-authorization.md): 18 câu hỏi, Mid-Level - [HttpClient & Networking](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/httpclient-networking.md): 20 câu hỏi, Mid-Level - [Tuần tự hóa JSON](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/json-serialization.md): 20 câu hỏi, Mid-Level - [Entity Framework Core nâng cao](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/ef-core-advanced.md): 25 câu hỏi, Mid-Level - [Các tính năng nâng cao của C#](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/csharp-advanced-features.md): 20 câu hỏi, Mid-Level - [Clean Architecture](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/clean-architecture.md): 20 câu hỏi, Mid-Level - [Logging, Monitoring & Observability](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/logging-monitoring.md): 22 câu hỏi, Mid-Level - [Kiểm thử đơn vị & xUnit](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/unit-testing-xunit.md): 20 câu hỏi, Mid-Level - [Kiểm thử tích hợp](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/integration-testing.md): 18 câu hỏi, Mid-Level - [Docker & Containerization](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/docker-containerization.md): 16 câu hỏi, Mid-Level - [Quản lý gói NuGet](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/nuget-package-management.md): 16 câu hỏi, Mid-Level - [Memory Management & GC](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/memory-management-gc.md): 22 câu hỏi, Senior - [Lập trình phản ứng](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/reactive-programming.md): 24 câu hỏi, Senior - [Async/await & Mẫu thiết kế](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/async-await-patterns.md): 26 câu hỏi, Senior - [.NET Design Patterns](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/dotnet-design-patterns.md): 24 câu hỏi, Senior - [Tối ưu hóa hiệu năng](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/performance-optimization.md): 22 câu hỏi, Senior - [Bảo mật & Best Practices](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/security-best-practices.md): 24 câu hỏi, Senior - [SignalR & Thời gian thực](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/signalr-realtime.md): 22 câu hỏi, Senior - [Kiến trúc Microservices](https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/microservices-architecture.md): 25 câu hỏi, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/vi/technologies/dotnet/cau-hoi-phong-van/minimal-apis