Interview Q&A

Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.

4608 total questions 4508 technical 100 career & HR 4272 from PDF library

Showing 1476–1500 of 4608

Career & HR topics

By tech stack

Popular tracks

Junior PDF
What is Entity Framework Core?

Short answer: Entity Framework Core (EF Core) is a modern, lightweight, cross-platform, open-source ORM (Object-Relational Mapper) for .NET. It allows developers to interact with databases using C# objects rather than SQ…

EF Core Read answer
Mid PDF
What are the main differences between Entity Framework (EF6) and EF Core?

Short answer: Feature EF6 EF Core Platform .NET Framework only Cross-platform (.NET Core) Performance Slower Faster and more optimized LINQ support Limited Enhanced Change tracking Basic More efficient Migrations Availab…

EF Core Read answer
Junior PDF
What is ORM (Object-Relational Mapping)?

Short answer: ORM is a technique that maps objects in code to relational database tables. EF Core implements ORM by mapping .NET classes (entities) to database tables using DbContext, DbSet, and conventions or Fluent API…

EF Core Read answer
Junior PDF
What is ORM (Object-Relational Mapping)?

Short answer: How does EF Core implement it? ORM is a technique that maps objects in code to relational database tables. EF Core implements ORM by mapping .NET classes (entities) to database tables using DbContext, DbSet…

EF Core Read answer
Junior PDF
What is a DbContext?

Short answer: DbContext is the primary class for interacting with the database in EF Core. Explain a bit more It: Manages database connections Tracks changes to entities Provides methods for querying and saving data Conf…

EF Core Read answer
Junior PDF
What is a DbContext?

Short answer: What responsibilities does it have? DbContext is the primary class for interacting with the database in EF Core. It: Manages database connections Tracks changes to entities Provides methods for querying and…

EF Core Read answer
Junior PDF
What is DbSet<T>?

Short answer: DbSet&lt;T&gt; represents a collection of entities of type T in the context. Each DbSet maps to a table in the database, where T is the type of the entity. Real-world example (ShopNest) ShopNest’s order ser…

EF Core Read answer
Junior PDF
What is DbSet<T>?

Short answer: How does it map to database tables? DbSet&lt;T&gt; represents a collection of entities of type T in the context. Each DbSet maps to a table in the database, where T is the type of the entity. Real-world exa…

EF Core Read answer
Mid PDF
What are entities and how do they map to tables?

Short answer: column. EF Core uses conventions or Fluent API to configure the mappings. Real-world example (ShopNest) ShopNest’s order service uses EF Core to save an Order and its line items in one SaveChangesAsync() ca…

EF Core Read answer
Senior PDF
How do you educate junior developers about design patterns and SOLID?

Short answer: I use a combination of: Simple examples showing before/after code refactoring. Explain a bit more Pair programming sessions to explain thought processes. Encouraging reading and discussing classic books lik…

SOLID Read answer
Junior PDF
What is the difference between Composition and Inheritance?

Short answer: Inheritance creates an “is-a” relationship, where a subclass inherits behavior and properties from a parent class. It can lead to tight coupling and fragile hierarchies if overused. Composition creates a “h…

SOLID Read answer
Mid PDF
How does the Decorator pattern differ from the Proxy pattern?

Short answer: Decorator adds additional responsibilities to objects dynamically without altering their interface. It wraps the original object to extend behavior. Proxy controls access to an object, possibly adding lazy…

SOLID Read answer
Senior PDF
What is the Adapter pattern and how does it relate to SOLID?

Short answer: Adapter converts the interface of a class into another interface clients expect, allowing incompatible interfaces to work together. It promotes Open/Closed Principle (OCP) by enabling new integrations witho…

SOLID Read answer
Senior PDF
How do you implement Lazy loading with design patterns?

Short answer: Use the Proxy or Virtual Proxy pattern where a placeholder object controls access to the real object and defers its creation until needed. In .NET, Lazy&lt;T&gt; provides built-in lazy loading. Real-world e…

SOLID Read answer
Mid PDF
What are anti-patterns related to DI and Singleton?

Short answer: Service Locator anti-pattern: Hides dependencies instead of injecting them explicitly. Overusing Singleton: Leads to hidden global state and testing difficulties. Improper Singleton thread safety: Causes ra…

SOLID Read answer
Mid PDF
Can you explain the Template Method pattern?

Short answer: Template Method defines the skeleton of an algorithm in a base class, deferring some steps to subclasses. It allows subclasses to redefine parts of the algorithm without changing its structure. It supports…

SOLID Read answer
Senior PDF
How do SOLID principles help in microservices architecture?

Short answer: SOLID promotes small, single-responsibility services (SRP), clear interfaces (ISP), loose coupling (DIP), and extendable design (OCP). This aligns well with microservices by encouraging modular, maintainabl…

SOLID Read answer
Senior PDF
What design pattern helps in implementing Undo/Redo functionality?

Short answer: The Command Pattern encapsulates requests as objects, allowing operations to be stored, undone, or redone by maintaining command history. Real-world example (ShopNest) Patterns in ShopNest should solve a re…

SOLID Read answer
Mid PDF
How do you avoid tight coupling in large .NET projects?

Short answer: Use interfaces and abstractions (DIP). Apply Dependency Injection. Modularize code into bounded contexts or separate projects. Use events or messaging for decoupled communication. Avoid static state and glo…

SOLID Read answer
Mid PDF
How does the Command pattern work?

Short answer: Encapsulates a request as an object with methods to execute and possibly undo the operation. The invoker calls commands without knowing the action details, supporting decoupling and flexible request handlin…

SOLID Read answer
Junior PDF
What is the difference between Cohesion and Coupling?

Short answer: Cohesion: Degree to which elements of a module belong together. High cohesion means focused, well-defined responsibilities. Coupling: Degree of interdependence between modules. Low coupling means modules ar…

SOLID Read answer
Senior PDF
How do you manage dependencies between microservices?

Short answer: Use API contracts and versioning. Employ service discovery and load balancing. Prefer asynchronous messaging/event-driven architecture to reduce tight coupling. Apply circuit breakers and retries for fault…

SOLID Read answer
Senior PDF
What is the role of Abstract classes vs Interfaces in SOLID design?

Short answer: Interfaces define contracts with no implementation, supporting ISP and DIP by allowing flexible implementations. Abstract classes provide a base implementation and shared code, useful for Template Method pa…

SOLID Read answer
Mid PDF
Can you explain the Builder pattern with a real-world .NET example?

Short answer: Builder separates complex object construction from its representation. For example, building an HttpRequest with optional headers, query params, and body: public class HttpRequestBuilder Example code { priv…

SOLID Read answer
Senior PDF
How does the Observer pattern fit into SOLID and DI?

Short answer: Observer supports SRP by separating notification logic from core business logic and DIP by depending on abstractions (observers). It fits DI because observers can be injected, allowing flexible runtime subs…

SOLID Read answer

Entity Framework Core Entity Framework Core Tutorial · EF Core

Short answer: Entity Framework Core (EF Core) is a modern, lightweight, cross-platform, open-source ORM (Object-Relational Mapper) for .NET. It allows developers to interact with databases using C# objects rather than SQL queries.

Real-world example (ShopNest)

ShopNest’s order service uses EF Core to save an Order and its line items in one SaveChangesAsync() call inside a transaction.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Entity Framework Core Entity Framework Core Tutorial · EF Core

Short answer: Feature EF6 EF Core Platform .NET Framework only Cross-platform (.NET Core) Performance Slower Faster and more optimized LINQ support Limited Enhanced Change tracking Basic More efficient Migrations Available Improved and CLI-friendly Extensibility Limited Highly extensible

Real-world example (ShopNest)

ShopNest’s order service uses EF Core to save an Order and its line items in one SaveChangesAsync() call inside a transaction.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Entity Framework Core Entity Framework Core Tutorial · EF Core

Short answer: ORM is a technique that maps objects in code to relational database tables. EF Core implements ORM by mapping .NET classes (entities) to database tables using DbContext, DbSet, and conventions or Fluent API.

Real-world example (ShopNest)

ShopNest’s order service uses EF Core to save an Order and its line items in one SaveChangesAsync() call inside a transaction.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Entity Framework Core Entity Framework Core Tutorial · EF Core

Short answer: How does EF Core implement it? ORM is a technique that maps objects in code to relational database tables. EF Core implements ORM by mapping .NET classes (entities) to database tables using DbContext, DbSet, and conventions or Fluent API.

Real-world example (ShopNest)

ShopNest’s order service uses EF Core to save an Order and its line items in one SaveChangesAsync() call inside a transaction.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Entity Framework Core Entity Framework Core Tutorial · EF Core

Short answer: DbContext is the primary class for interacting with the database in EF Core.

Explain a bit more

It: Manages database connections Tracks changes to entities Provides methods for querying and saving data Configures models and relationships DbContext is the primary class for interacting with the database in EF Core. It: Manages database connections Tracks changes to entities Provides methods for querying and saving data Configures models and relationships

Real-world example (ShopNest)

ShopNest registers AppDbContext as scoped. One HTTP request = one context. Never inject it as a singleton.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Entity Framework Core Entity Framework Core Tutorial · EF Core

Short answer: What responsibilities does it have? DbContext is the primary class for interacting with the database in EF Core. It: Manages database connections Tracks changes to entities Provides methods for querying and saving data Configures models and relationships

Real-world example (ShopNest)

ShopNest registers AppDbContext as scoped. One HTTP request = one context. Never inject it as a singleton.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Entity Framework Core Entity Framework Core Tutorial · EF Core

Short answer: DbSet<T> represents a collection of entities of type T in the context. Each DbSet maps to a table in the database, where T is the type of the entity.

Real-world example (ShopNest)

ShopNest’s order service uses EF Core to save an Order and its line items in one SaveChangesAsync() call inside a transaction.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Entity Framework Core Entity Framework Core Tutorial · EF Core

Short answer: How does it map to database tables? DbSet<T> represents a collection of entities of type T in the context. Each DbSet maps to a table in the database, where T is the type of the entity.

Real-world example (ShopNest)

ShopNest’s order service uses EF Core to save an Order and its line items in one SaveChangesAsync() call inside a transaction.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Entity Framework Core Entity Framework Core Tutorial · EF Core

Short answer: column. EF Core uses conventions or Fluent API to configure the mappings.

Real-world example (ShopNest)

ShopNest’s order service uses EF Core to save an Order and its line items in one SaveChangesAsync() call inside a transaction.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Design Patterns & SOLID Design Patterns in C# · SOLID

Short answer: I use a combination of: Simple examples showing before/after code refactoring.

Explain a bit more

Pair programming sessions to explain thought processes. Encouraging reading and discussing classic books like “Clean Code” and “Design Patterns”. Practical coding exercises and code reviews focused on SOLID principles. Showing real project scenarios where principles improved code quality and maintainability. Promoting a culture of continuous learning and curiosity. Bonus / Miscellaneous

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Design Patterns & SOLID Design Patterns in C# · SOLID

Short answer: Inheritance creates an “is-a” relationship, where a subclass inherits behavior and properties from a parent class. It can lead to tight coupling and fragile hierarchies if overused. Composition creates a “has-a” relationship, where a class contains instances of other classes and delegates behavior to them. It’s more flexible and promotes loose coupling.

Real-world example (ShopNest)

Patterns in ShopNest should solve a real pain (swappable payments, test seams)—not be added for decoration.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Design Patterns & SOLID Design Patterns in C# · SOLID

Short answer: Decorator adds additional responsibilities to objects dynamically without altering their interface. It wraps the original object to extend behavior. Proxy controls access to an object, possibly adding lazy initialization, access control, or logging, without changing its interface.

Real-world example (ShopNest)

ShopNest payment fees use Strategy: IFeeCalculator with UPI/Card implementations chosen at runtime.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Design Patterns & SOLID Design Patterns in C# · SOLID

Short answer: Adapter converts the interface of a class into another interface clients expect, allowing incompatible interfaces to work together. It promotes Open/Closed Principle (OCP) by enabling new integrations without modifying existing code.

Real-world example (ShopNest)

ShopNest payment fees use Strategy: IFeeCalculator with UPI/Card implementations chosen at runtime.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Design Patterns & SOLID Design Patterns in C# · SOLID

Short answer: Use the Proxy or Virtual Proxy pattern where a placeholder object controls access to the real object and defers its creation until needed. In .NET, Lazy<T> provides built-in lazy loading.

Real-world example (ShopNest)

Patterns in ShopNest should solve a real pain (swappable payments, test seams)—not be added for decoration.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Design Patterns & SOLID Design Patterns in C# · SOLID

Short answer: Service Locator anti-pattern: Hides dependencies instead of injecting them explicitly. Overusing Singleton: Leads to hidden global state and testing difficulties. Improper Singleton thread safety: Causes race conditions. Injecting concrete implementations: Violates DIP.

Real-world example (ShopNest)

ShopNest payment fees use Strategy: IFeeCalculator with UPI/Card implementations chosen at runtime.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Design Patterns & SOLID Design Patterns in C# · SOLID

Short answer: Template Method defines the skeleton of an algorithm in a base class, deferring some steps to subclasses. It allows subclasses to redefine parts of the algorithm without changing its structure. It supports OCP by enabling extensions through inheritance.

Real-world example (ShopNest)

Patterns in ShopNest should solve a real pain (swappable payments, test seams)—not be added for decoration.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Design Patterns & SOLID Design Patterns in C# · SOLID

Short answer: SOLID promotes small, single-responsibility services (SRP), clear interfaces (ISP), loose coupling (DIP), and extendable design (OCP). This aligns well with microservices by encouraging modular, maintainable, and testable service boundaries.

Real-world example (ShopNest)

Open/Closed in ShopNest: add a new payment method by adding a class, not by editing a giant switch in CheckoutService.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Design Patterns & SOLID Design Patterns in C# · SOLID

Short answer: The Command Pattern encapsulates requests as objects, allowing operations to be stored, undone, or redone by maintaining command history.

Real-world example (ShopNest)

Patterns in ShopNest should solve a real pain (swappable payments, test seams)—not be added for decoration.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Design Patterns & SOLID Design Patterns in C# · SOLID

Short answer: Use interfaces and abstractions (DIP). Apply Dependency Injection. Modularize code into bounded contexts or separate projects. Use events or messaging for decoupled communication. Avoid static state and global variables.

Real-world example (ShopNest)

Patterns in ShopNest should solve a real pain (swappable payments, test seams)—not be added for decoration.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Design Patterns & SOLID Design Patterns in C# · SOLID

Short answer: Encapsulates a request as an object with methods to execute and possibly undo the operation. The invoker calls commands without knowing the action details, supporting decoupling and flexible request handling.

Real-world example (ShopNest)

Patterns in ShopNest should solve a real pain (swappable payments, test seams)—not be added for decoration.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Design Patterns & SOLID Design Patterns in C# · SOLID

Short answer: Cohesion: Degree to which elements of a module belong together. High cohesion means focused, well-defined responsibilities. Coupling: Degree of interdependence between modules. Low coupling means modules are independent and changes in one don’t affect others.

Real-world example (ShopNest)

Patterns in ShopNest should solve a real pain (swappable payments, test seams)—not be added for decoration.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Design Patterns & SOLID Design Patterns in C# · SOLID

Short answer: Use API contracts and versioning. Employ service discovery and load balancing. Prefer asynchronous messaging/event-driven architecture to reduce tight coupling. Apply circuit breakers and retries for fault tolerance.

Real-world example (ShopNest)

Patterns in ShopNest should solve a real pain (swappable payments, test seams)—not be added for decoration.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Design Patterns & SOLID Design Patterns in C# · SOLID

Short answer: Interfaces define contracts with no implementation, supporting ISP and DIP by allowing flexible implementations. Abstract classes provide a base implementation and shared code, useful for Template Method pattern and partial abstraction.

Example code

Interfaces define contracts with no implementation, supporting ISP and DIP by allowing flexible implementations. Abstract classes provide a base implementation and shared code, useful for Template Method pattern and partial abstraction.

Real-world example (ShopNest)

Open/Closed in ShopNest: add a new payment method by adding a class, not by editing a giant switch in CheckoutService.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Design Patterns & SOLID Design Patterns in C# · SOLID

Short answer: Builder separates complex object construction from its representation. For example, building an HttpRequest with optional headers, query params, and body: public class HttpRequestBuilder

Example code

{
private HttpRequestMessage _request = new HttpRequestMessage();
public HttpRequestBuilder SetMethod(HttpMethod method)
{
_request.Method = method;
return this;
}
public HttpRequestBuilder AddHeader(string key, string value)
{ _request.Headers.Add(key, value); return this;
}
public HttpRequestMessage Build() => _request;
} Allows building requests step-by-step fluently.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Design Patterns & SOLID Design Patterns in C# · SOLID

Short answer: Observer supports SRP by separating notification logic from core business logic and DIP by depending on abstractions (observers). It fits DI because observers can be injected, allowing flexible runtime subscriptions and loose coupling.

Real-world example (ShopNest)

ShopNest payment fees use Strategy: IFeeCalculator with UPI/Card implementations chosen at runtime.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details