
Clean Architecture
Layered architecture, CQRS, MediatR, repository pattern, separation of concerns, testability
1What is the Clean Architecture principle?
What is the Clean Architecture principle?
Câu trả lời
Clean Architecture organizes code into concentric layers where dependencies point only inward (toward the domain). The Domain layer (entities, business rules) has no infrastructure dependencies. Outer layers (UI, Database, API) depend on domain abstractions via Dependency Inversion. This ensures testability, framework independence, and code maintainability.
2What are the main layers of Clean Architecture?
What are the main layers of Clean Architecture?
Câu trả lời
Clean Architecture has 4 main layers: Domain (entities, business rules, repository interfaces), Application (use cases, DTOs, application logic), Infrastructure (repository implementations, DbContext, external services), and Presentation (API controllers, UI). Domain is at the center and depends on nothing. Application depends on Domain. Infrastructure and Presentation depend on Application and Domain.
3What is the CQRS pattern?
What is the CQRS pattern?
Câu trả lời
CQRS (Command Query Responsibility Segregation) separates read (Queries) and write (Commands) operations. Commands modify state and return void or a simple result. Queries return data without modifying state. This separation allows independent optimization of reads (Dapper, SQL views) and writes (EF Core, DDD aggregates), and different scaling for each side.
What is the role of MediatR in Clean Architecture?
How to define a Command in MediatR?
+17 câu hỏi phỏng vấn
Các chủ đề phỏng vấn .NET khác
C# Basics
LINQ & Delegates
C# Language Essentials
ASP.NET Core Fundamentals
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
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
Nắm vững .NET cho lần phỏng vấn tiếp theo
Truy cập tất cả câu hỏi, flashcards, bài kiểm tra kỹ thuật, bài tập code review và mô phỏng phỏng vấn.
Bắt đầu miễn phí