I. Object-Oriented Programming (OOP) & C#
1) Access Modifiers: Explain the visibility and differences among the C# access modifiers: private, protected, and internal.
2) Abstract Class vs. Interface: Articulate the fundamental differences between an Abstract Class and an Interface in C#. When would you use a default interface method (DIM)?
3) Constructors and Types: What is the purpose of a constructor? Can you describe the utility of a static constructor and a private constructor?
II. Architecture, Security, & API (ASP.NET Core Focus)
1) Dependency Injection: Explain the role of Dependency Injection in a modern framework like ASP.NET Core. Describe the differences between Transient, Scoped, and Singleton service lifetimes.
2) Middleware: What is Middleware in ASP.NET Core? Briefly describe its function and how the request pipeline is constructed.
3) JWT: Explain the structure of a JWT (JSON Web Token). How does the token ensure that the payload has not been tampered with?
4) Authentication vs. Authorization: Clearly distinguish between the concepts of Authentication and Authorization in an API.
HTTP Verbs: Explain the intended use for the primary HTTP verbs (GET, POST, PUT, DELETE) in a RESTful API design.
5) Put and Patch Difference: When designing an API, explain the functional difference between an HTTP PUT request and an HTTP PATCH request.
III. Frontend (Angular Focus)
1) Angular: Briefly describe the key architectural components of an Angular application (Components, Modules, Services).
Lifecycle Hooks: What are Angular Lifecycle Hooks? Name at least three and describe the moment they are triggered during a component's lifetime.
2) Data Passing: Detail the methods for passing data between Parent and Child components in Angular.
IV. SQL & Database
1) Stored Procedure vs. Function: What are the major functional differences between an SQL Stored Procedure and a User-Defined Function, particularly regarding DML execution and integration within a SELECT statement?
2) Delete, Truncate, Drop Difference: Compare the SQL commands DELETE, TRUNCATE, and DROP. Explain which one is DDL and which one is DML, and discuss their rollback capabilities.
3) Indexers and Types: What is a database Indexer? Explain the fundamental difference between a Clustered Index and a Non-Clustered Index.
4) What is a View: Define an SQL View. What is the primary benefit of using a View in application development?
When preparing for interviews in .NET, one question always pops up:
👉 “Can you explain Dependency Injection lifetimes – Singleton, Scoped, and Transient – with real-time examples?”
Here’s an easy way to remember them with real-world analogies:
🔹 Singleton – One instance for the entire application.
💡 Example: A train engine 🚂. No matter how many compartments (requests) come and go, the same engine pulls them all.
👉 In code: Use for logging, configuration, caching.
🔹 Scoped – One instance per request.
💡 Example: A waiter in a restaurant 🍽️. Each customer (request) gets a new waiter. Within the same request, the same waiter serves you until you leave.
👉 In code: Use for DbContext, Unit of Work.
🔹 Transient – A new instance every time it’s requested.
💡 Example: A pen in a stationery shop 🖊️. Every time you buy one, you get a brand new pen.
👉 In code: Use for lightweight, stateless services like validation, helper utilities.
⚡ Interview Tip:
Don’t just define them — relate with real-world examples and mention where you’d use them in microservices or web apps. That shows both understanding and practical thinking.
🔑 Quick Recap:
Singleton ➝ Share globally across app lifetime.
Scoped ➝ Fresh per request.
Transient ➝ Fresh every call.
4. Have you created any custom middleware? Which interface did you implement?
Typically, custom middleware doesn’t implement an interface — it just needs a constructor that takes a RequestDelegate and an Invoke or InvokeAsync method with an HttpContext parameter.However, starting from ASP.NET Core 2.0, we can also implement the IMiddleware interface to use dependency injection for middleware.”
For simple, stateless middleware — convention-based is fine.
But if I need dependency injection or per-request services, I’d implement IMiddleware so it integrates cleanly with the DI container.”
When we mark a method as async and await calls like _context.Employee_Master.FindAsync(id) or _context.SaveChangesAsync(), the system doesn’t sit idle waiting for the database. Instead, the thread handling the request is released back to the thread pool, free to execute other incoming requests while the database operation completes. Once the awaited task finishes, the method automatically resumes from where it left off, thanks to the compiler-generated state machine. This approach ensures that long-running I/O operations—like database queries, API calls, or file operations—don’t block the server, keeping the application responsive under load. Even in CPU-heavy tasks, Task.Run() can offload work to background threads, preventing the main thread from freezing. Combined with proper exception handling and transaction management, async programming allows ASP.NET Core APIs to handle hundreds or thousands of concurrent requests efficiently, improving scalability and user experience. By embracing async/await, developers can write code that is not only clean and readable but also ensures that the application remains fast, responsive, and highly available. Here is a typical code sample:
Self-Contained Deployment:
When an ASP.NET Core application is published as self-contained, it includes the .NET runtime, meaning it does not require the .NET runtime to be pre-installed on the host machine. This deployment type generates an executable file specific to the application (e.g., FirstCoreWebApplication.exe on Windows or FirstCoreWebApplication on Linux/macOS).
RabbitMQ is a reliable message broker that enables asynchronous, decoupled communication between systems through queues, exchanges, and routing keys — ensuring scalability, fault tolerance, and flexibility in distributed .NET architectures.
NUnit is mature, attribute-driven, and great for traditional .NET testing.
xUnit.net is the newer, cleaner, and more flexible framework designed for modern .NET Core apps — and it’s Microsoft’s recommended testing framework today.
The SOLID principles guide how we structure our C# classes and interfaces.
They help make our code more maintainable, flexible, and testable.
“What practices ensure a scalable and secure Web API?”
Use Dependency Injection for loose coupling
Apply SOLID principles
Implement JWT authentication & role-based authorization
Use versioning for backward compatibility
Apply caching & pagination for performance
Add Swagger, logging, and health checks for observability
“CQRS stands for Command Query Responsibility Segregation — it separates read and write logic into different models.
Commands handle data modifications, while Queries handle data retrieval.
In .NET, we often implement it using MediatR with separate Command and Query handlers.
It improves scalability, performance, and maintainability, especially in complex or event-driven systems.
However, it adds architectural complexity and should be used only when justified.”
What Is Docker?
Docker allows you to package your application along with all its dependencies, runtime, and configuration into a lightweight container.
Think of it as a mini virtual machine — but way faster, smaller, and more efficient 🚀
✅ Runs consistently on Windows, Linux, or Cloud
✅ Eliminates “it works on my machine” errors
✅ Ideal for microservices & cloud-native apps
Lightning-fast deployments with smaller images
𝐌𝐨𝐧𝐨𝐥𝐢𝐭𝐡𝐢𝐜 𝐀𝐫𝐜𝐡𝐢𝐭𝐞𝐜𝐭𝐮𝐫𝐞
🔹 Single, unified codebase
🔹 Easier to develop & deploy (great for small apps)
🔹 Fewer cross-service dependencies = simpler management
🔹 Scaling is tough—you scale the whole system for small changes
🔹 One bug can bring down the entire app 😬
🧩 𝐌𝐢𝐜𝐫𝐨𝐬𝐞𝐫𝐯𝐢𝐜𝐞𝐬 𝐀𝐫𝐜𝐡𝐢𝐭𝐞𝐜𝐭𝐮𝐫𝐞
🔹 Split into smaller, independent services
🔹 Each service can be built, deployed & scaled separately
🔹 Fault isolation—one service fails, others keep running
🔹 Freedom to use different tech stacks per service
🔹 More complex to manage (think service discovery, communication, etc.)
⚖️ 𝐖𝐡𝐞𝐧 𝐭𝐨 𝐂𝐡𝐨𝐨𝐬𝐞 𝐖𝐡𝐚𝐭
✅ 𝐌𝐨𝐧𝐨𝐥𝐢𝐭𝐡𝐢𝐜: Best for small to mid-sized apps where speed & simplicity matter
✅ 𝐌𝐢𝐜𝐫𝐨𝐬𝐞𝐫𝐯𝐢𝐜𝐞𝐬: Ideal for large-scale systems needing scalability, flexibility & fault tolerance