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 1–25 of 154

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
Mid PDF
What are entities and how do they map to tables?

Short answer: Entities are .NET classes that represent database tables. Each property in the entity maps to a column. EF Core uses conventions or Fluent API to configure the mappings. Real-world example (ShopNest) ShopNe…

EF Core Read answer
Junior PDF
What is a POCO class?

Short answer: POCO (Plain Old CLR Object) is a simple class without any dependency on EF Core or any base class. EF Core uses POCOs as entities for data modeling. Real-world example (ShopNest) ShopNest’s order service us…

EF Core Read answer
Junior PDF
What is a navigation property?

Short answer: Navigation properties allow navigation from one entity to related entities. They define relationships (one-to-one, one-to-many, many-to-many). Example: public class Order Example code { public int Id { get;…

EF Core Read answer
Mid PDF
What are scalar properties, complex properties, and shadow properties?

Short answer: Scalar: Simple types like int, string, DateTime Complex: Nested objects mapped to multiple columns (Value objects) Shadow: Properties not defined in the .NET class but tracked by EF Core Real-world example…

EF Core Read answer
Junior PDF
What is LINQ?

Short answer: LINQ (Language Integrated Query) lets you query collections using C# syntax. LINQ to Entities is LINQ querying against the EF Core model, translated to SQL and executed in the database. Real-world example (…

EF Core Read answer
Junior PDF
What is LINQ?

Short answer: What is “LINQ to Entities”? LINQ (Language Integrated Query) lets you query collections using C# syntax. LINQ to Entities is LINQ querying against the EF Core model, translated to SQL and executed in the da…

EF Core Read answer
Junior PDF
How do you write a basic CRUD operation (Insert / Update / Delete / Read) in EF Core?

Short answer: // Create context.Users.Add(new User { Name = &quot;John&quot; }); context.SaveChanges(); // Read var user = context.Users.FirstOrDefault(u =&gt; u.Id == 1); // Update user.Name = &quot;Jane&quot;; context.…

EF Core Read answer
Mid PDF
What are the benefits of using EF Core?

Short answer: Productivity via abstraction from SQL Cross-platform support Strongly-typed LINQ queries Migration support Tracks changes automatically Works well with dependency injection Real-world example (ShopNest) Sho…

EF Core Read answer
Mid PDF
What are some disadvantages / pitfalls of using EF Core?

Short answer: May generate inefficient SQL for complex queries Learning curve for advanced features Less control over fine-tuned SQL performance Not ideal for high-performance bulk operations Entity Framework Core – Sche…

EF Core Read answer
Junior PDF
What is Code First approach?

Short answer: Code First is an EF Core approach where you define your database schema using C# classes, and EF Core generates the database from your code. ✅ Advantages: Full control via C# code (POCOs) Easily version-con…

EF Core Read answer
Junior PDF
What is Code First approach?

Short answer: Advantages and when to use it Code First is an EF Core approach where you define your database schema using C# classes, and EF Core generates the database from your code. ✅ Advantages: Full control via C# c…

EF Core Read answer
Junior PDF
What is Database First approach?

Short answer: Database First involves generating C# entity classes and a DbContext from an existing database. ✅ Pros: Quick start if the DB already exists Ensures model aligns with legacy databases ❌ Cons: Harder to vers…

EF Core Read answer
Junior PDF
What is Database First approach?

Short answer: Use‑cases and pros and cons Database First involves generating C# entity classes and a DbContext from an existing database. ✅ Pros: Quick start if the DB already exists Ensures model aligns with legacy data…

EF Core Read answer
Junior PDF
What is Model First? Is it used in EF Core?

Short answer: Model First allows creating a database model using a designer (EDMX file), then generating both the database and code from that model. ⚠ EF Core does not support Model First. This approach was available in…

EF Core Read answer
Junior PDF
What is Model First?

Short answer: Is it used in EF Core? Model First allows creating a database model using a designer (EDMX file), then generating both the database and code from that model. ⚠ EF Core does not support Model First. This app…

EF Core Read answer
Mid PDF
How do you reverse engineer a database in EF Core (DB First) into entity classes & DbContext?

Short answer: Use the CLI or Package Manager Console: dotnet ef dbcontext scaffold &quot;YourConnectionString&quot; Microsoft.EntityFrameworkCore.SqlServer -o Models OR Scaffold-DbContext &quot;YourConnectionString&quot;…

EF Core 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

Entity Framework Core Entity Framework Core Tutorial · EF Core

Short answer: Entities are .NET classes that represent database tables. Each property in the entity maps to a 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

Entity Framework Core Entity Framework Core Tutorial · EF Core

Short answer: POCO (Plain Old CLR Object) is a simple class without any dependency on EF Core or any base class. EF Core uses POCOs as entities for data modeling.

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: Navigation properties allow navigation from one entity to related entities. They define relationships (one-to-one, one-to-many, many-to-many). Example: public class Order

Example code

{
public int Id { get; set; }
public Customer Customer { get; set; } // Navigation property
}

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: Scalar: Simple types like int, string, DateTime Complex: Nested objects mapped to multiple columns (Value objects) Shadow: Properties not defined in the .NET class but tracked by EF Core

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: LINQ (Language Integrated Query) lets you query collections using C# syntax. LINQ to Entities is LINQ querying against the EF Core model, translated to SQL and executed in the database.

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: What is “LINQ to Entities”? LINQ (Language Integrated Query) lets you query collections using C# syntax. LINQ to Entities is LINQ querying against the EF Core model, translated to SQL and executed in the database.

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: // Create context.Users.Add(new User { Name = "John" }); context.SaveChanges(); // Read var user = context.Users.FirstOrDefault(u => u.Id == 1); // Update user.Name = "Jane"; context.SaveChanges(); // Delete context.Users.Remove(user); context.SaveChanges();

Example code

// Create context.Users.Add(new User { Name = "John" }); context.SaveChanges(); // Read var user = context.Users.FirstOrDefault(u => u.Id == 1); // Update user.Name = "Jane"; context.SaveChanges(); // Delete context.Users.Remove(user); context.SaveChanges();

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: Productivity via abstraction from SQL Cross-platform support Strongly-typed LINQ queries Migration support Tracks changes automatically Works well with dependency injection

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: May generate inefficient SQL for complex queries Learning curve for advanced features Less control over fine-tuned SQL performance Not ideal for high-performance bulk operations Entity Framework Core – Schema Design & Migrations Interview Questions

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: Code First is an EF Core approach where you define your database schema using C# classes, and EF Core generates the database from your code. ✅ Advantages: Full control via C# code (POCOs) Easily version-controlled Supports migrations to handle schema evolution Works well with Domain-Driven Design 📌 When to use: When you're starting a new project or prefer designing schema in code.

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: Advantages and when to use it Code First is an EF Core approach where you define your database schema using C# classes, and EF Core generates the database from your code. ✅ Advantages: Full control via C# code (POCOs) Easily version-controlled Supports migrations to handle schema evolution Works well with Domain-Driven Design 📌 When to use: When you're starting a new project or prefer designing schema in code.

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: Database First involves generating C# entity classes and a DbContext from an existing database. ✅ Pros: Quick start if the DB already exists Ensures model aligns with legacy databases ❌ Cons: Harder to version control Schema changes must be manually re-scaffolded 📌 When to use: For integrating with existing databases or legacy systems.

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: Use‑cases and pros and cons Database First involves generating C# entity classes and a DbContext from an existing database. ✅ Pros: Quick start if the DB already exists Ensures model aligns with legacy databases ❌ Cons: Harder to version control Schema changes must be manually re-scaffolded 📌 When to use: For integrating with existing databases or legacy systems.

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: Model First allows creating a database model using a designer (EDMX file), then generating both the database and code from that model. ⚠ EF Core does not support Model First. This approach was available in EF6 with Visual Studio tooling.

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: Is it used in EF Core? Model First allows creating a database model using a designer (EDMX file), then generating both the database and code from that model. ⚠ EF Core does not support Model First. This approach was available in EF6 with Visual Studio tooling.

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: Use the CLI or Package Manager Console: dotnet ef dbcontext scaffold "YourConnectionString" Microsoft.EntityFrameworkCore.SqlServer -o Models OR Scaffold-DbContext "YourConnectionString" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models ✅ It generates: Entity classes DbContext class Mappings based on database schema

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
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