1. What is Entity Framework Core?
IntermediateAnswer: ORM for data access with object-to-database mapping
Entity Framework Core is an ORM (Object-Relational Mapper) that enables .NET developers to work with databases using .NET objects.
24 questions that come up in ASP.NET Core technical interviews, each with the answer and an explanation of why it is right.
Test yourself — 90 question bankAnswer: ORM for data access with object-to-database mapping
Entity Framework Core is an ORM (Object-Relational Mapper) that enables .NET developers to work with databases using .NET objects.
Answer: Cross-platform, high-performance framework for building web apps
ASP.NET Core is a cross-platform, open-source framework for building modern web applications and APIs. It runs on Windows, Linux, and macOS.
Answer: Real-time communication library for web sockets
SignalR enables real-time, bi-directional communication. Uses WebSockets when available, falls back to other transports. Use for chat, notifications, dashboards.
Answer: Session with database enabling queries and saves
DbContext represents a session with the database. It allows querying and saving data. Configure entity mappings and database connection.
Answer: ASP.NET Core is cross-platform and modular
ASP.NET Core is cross-platform (Windows, Linux, macOS), modular, open-source, and high-performance. ASP.NET Framework is Windows-only and monolithic.
Answer: High-performance RPC framework using HTTP/2
gRPC is high-performance RPC framework using HTTP/2 and Protocol Buffers. Faster than REST. Use for microservice communication.
Answer: Version control for database schema changes
Migrations provide version control for database schema. Create with Add-Migration, apply with Update-Database. Tracks schema changes over time.
Answer: Model-View-Controller architectural pattern
MVC (Model-View-Controller) separates application into three components: Models (data), Views (UI), Controllers (logic). Promotes separation of concerns.
Answer: Framework for building interactive web UIs with C#
Blazor builds interactive web UIs using C# instead of JavaScript. Blazor Server (server-side) or Blazor WebAssembly (client-side). Shares code with backend.
Answer: Handles requests and returns responses
Controllers handle incoming HTTP requests, process them (often interacting with models), and return responses (usually views or data).
Answer: Ensures data meets requirements before processing
Validation ensures data meets requirements. Use data annotations ([Required], [StringLength]) or FluentValidation. Automatic with model binding.
Answer: Caching shared across multiple servers
Distributed caching shares cache across multiple servers. Use Redis or SQL Server. Essential for load-balanced applications. Configure with IDistributedCache.
Answer: Presentation layer rendering HTML
Views are responsible for presenting data to users. They contain HTML markup with embedded Razor syntax for dynamic content.
Answer: In-memory caching for single server performance
Memory caching stores data in server memory. Fast but not shared across servers. Use IMemoryCache. Good for single-server or data that can differ.
Answer: Dictionary containing validation errors and values
ModelState contains model binding values and validation errors. Check ModelState.IsValid before processing. Display errors with validation tag helpers.
Answer: Compresses responses to reduce bandwidth
Response compression compresses HTTP responses (gzip, brotli). Reduces bandwidth, improves load times. Configure with AddResponseCompression().
Answer: Verifying user identity
Authentication verifies who the user is. ASP.NET Core supports various schemes: Cookies, JWT, OAuth2, OpenID Connect, Windows, Certificate.
Answer: Markup syntax combining C# and HTML
Razor is a markup syntax for embedding C# code into HTML. Uses @ symbol to transition between HTML and C#. Example: @Model.Name.
Answer: Determines what authenticated user can access
Authorization determines what an authenticated user can do. Use [Authorize] attribute, policies, role-based or claims-based authorization.
Answer: Limits request rate to prevent abuse
Rate limiting restricts number of requests per time period. Prevents abuse, DDoS. Use AspNetCoreRateLimit package or built-in (.NET 7+).
Answer: Abstracts data access layer for testability
Repository pattern abstracts data access layer. Provides interface for data operations. Improves testability and decouples business logic from data access.
Answer: Restricts access to authenticated users
[Authorize] restricts access to authenticated users. Apply to controllers or actions. Can specify roles or policies: [Authorize(Roles = "Admin")].
Answer: Page-focused framework alternative to MVC
Razor Pages is a page-focused framework that makes building web UI easier and more productive. Simpler than MVC for page-based scenarios.
Answer: Maintains list of objects and coordinates persistence
Unit of Work maintains list of affected objects and coordinates writing changes as one transaction. Often used with Repository pattern.
The full ASP.NET Core bank has 90 questions across 3 difficulty levels — timed, shuffled, and scored.
Take the ASP.NET Core quiz