
ASP.NET Core Fundamentals
Controllers, Actions, Routing, Middleware, Dependency Injection, Configuration
1What is a Controller in ASP.NET Core?
What is a Controller in ASP.NET Core?
Antwoord
A Controller is a class that handles incoming HTTP requests and returns responses. It contains action methods (Actions) that process specific requests and generate content (HTML, JSON, etc.). Controllers inherit from ControllerBase for APIs or from Controller for MVC applications with views.
2What does an Action represent in an ASP.NET Core Controller?
What does an Action represent in an ASP.NET Core Controller?
Antwoord
An Action is a public method in a Controller that processes a specific HTTP request. It can return different types of results (IActionResult, ActionResult<T>, typed object). Actions are mapped to routes via conventional routing or route attributes.
3What is the difference between ControllerBase and Controller in ASP.NET Core?
What is the difference between ControllerBase and Controller in ASP.NET Core?
Antwoord
ControllerBase is the minimal base class for Web APIs that provides essential functionalities (ModelState, Request, Response). Controller inherits from ControllerBase and adds functionalities for views (ViewBag, ViewData, View()). Using ControllerBase for APIs improves performance by avoiding unnecessary view-related code.
How to define a route with attribute routing in ASP.NET Core?
What does the route pattern "{controller=Home}/{action=Index}/{id?}" do?
+15 gespreksvragen
Andere .NET-sollicitatieonderwerpen
C# Basics
LINQ & Delegates
C# Language Essentials
ASP.NET Core Request Lifecycle
Configuration & Settings
Application Lifecycle
Dependency Injection
Entity Framework Core
Minimal APIs
Web API Development
Async in ASP.NET Core
Authentication & Authorization
HttpClient & Networking
JSON Serialization
Entity Framework Core Advanced
C# Advanced Features
Clean Architecture
Logging, Monitoring & Observability
Unit Testing & xUnit
Integration Testing
Docker & Containerization
NuGet Package Management
Memory Management & GC
Reactive Programming
Async/await & Patterns
.NET Design Patterns
Performance Optimization
Security & Best Practices
SignalR & Real-time
Microservices Architecture
Beheers .NET voor je volgende gesprek
Krijg toegang tot alle vragen, flashcards, technische tests, code review-oefeningen en gespreksimulatoren.
Begin gratis