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 1601–1625 of 4608

Career & HR topics

By tech stack

Popular tracks

Mid PDF
What are shadow properties?

Short answer: Practical use cases. Properties not defined in your CLR classes but tracked by EF Core. Useful for storing metadata like CreatedBy, LastModified, or foreign keys without cluttering domain models. Say this i…

EF Core Read answer
Junior PDF
What is a global query filter? When/why to use it?

Short answer: A filter automatically applied to all queries on an entity. Useful for soft deletes, multi-tenancy (filtering by tenant ID), or data partitioning. Real-world example (ShopNest) ShopNest’s order service uses…

EF Core Read answer
Junior PDF
What is a global query filter?

Short answer: When/why to use it? A filter automatically applied to all queries on an entity. Useful for soft deletes, multi-tenancy (filtering by tenant ID), or data partitioning. Real-world example (ShopNest) ShopNest’…

EF Core Read answer
Mid PDF
How to optimize EF Core performance?

Short answer: Use .AsNoTracking() for read-only queries. Avoid over-fetching: only select needed columns (Select). Use eager loading wisely (Include). Minimize round trips by batching operations. Use compiled queries for…

EF Core Read answer
Junior PDF
What is batching?

Short answer: EF Core batches multiple commands into a single database round trip when possible. Improves performance by reducing network overhead. Real-world example (ShopNest) ShopNest’s order service uses EF Core to s…

EF Core Read answer
Junior PDF
What is batching?

Short answer: How does EF Core handle batch operations? EF Core batches multiple commands into a single database round trip when possible. Improves performance by reducing network overhead. Real-world example (ShopNest)…

EF Core Read answer
Mid PDF
How to handle large datasets / streaming?

Short answer: Use pagination (Skip, Take). Use streaming APIs like IAsyncEnumerable<T> with EF Core 5+. Avoid loading all data into memory at once. Real-world example (ShopNest) ShopNest’s order service uses EF Cor…

EF Core Read answer
Mid PDF
How to use caching with EF Core?

Short answer: EF Core doesn’t have built-in caching for query results. Use second-level caching libraries (like EFCoreSecondLevelCacheInterceptor). Use application-level caching (MemoryCache, Redis) strategically. Real-w…

EF Core Read answer
Mid PDF
How to handle raw SQL or stored procedures when needed?

Short answer: Use FromSqlRaw or ExecuteSqlRaw to execute raw SQL. Map results to entities or DTOs. Use for performance-critical or legacy operations not easily expressed in LINQ. Real-world example (ShopNest) ShopNest’s…

EF Core Read answer
Mid PDF
What are database providers?

Short answer: SQL Server, PostgreSQL, MySQL — differences, limitations? Providers abstract database-specific implementations. Each supports different features & SQL dialects. Some features may not be supported on all…

EF Core Read answer
Mid PDF
What about migrations and model changes when using non-relational / special databases?

Short answer: Migrations support may be limited or unavailable. May require manual scripts or provider-specific tooling. Consider NoSQL-specific approaches for schema changes. Real-world example (ShopNest) When ShopNest…

EF Core Read answer
Mid PDF
How to implement auditing (CreatedAt, UpdatedAt, soft delete)?

Short answer: Use shadow properties or explicit properties for timestamps. Override SaveChanges() to set audit fields. Use global query filters for soft delete support. Real-world example (ShopNest) ShopNest’s order serv…

EF Core Read answer
Junior PDF
What is soft delete?

Short answer: Mark entities as deleted without physically removing them. Implemented using a boolean flag and global query filters to exclude “deleted” records. Real-world example (ShopNest) ShopNest’s order service uses…

EF Core Read answer
Junior PDF
What is soft delete?

Short answer: Implementation strategies in EF Core? Mark entities as deleted without physically removing them. Implemented using a boolean flag and global query filters to exclude “deleted” records. Real-world example (S…

EF Core Read answer
Mid PDF
How to handle shadow foreign keys?

Short answer: EF Core can track foreign keys without them being defined in your model as properties. Useful for cleaner domain models. Real-world example (ShopNest) ShopNest’s order service uses EF Core to save an Order…

EF Core Read answer
Mid PDF
How to use Fluent API features (HasOne, HasMany, WithOne, WithMany)?

Short answer: Configure relationships explicitly. HasOne / WithMany to define navigation properties and cardinality. Offers fine control beyond Data Annotations. Real-world example (ShopNest) ShopNest’s order service use…

EF Core Read answer
Mid PDF
What are value converters in EF Core?

Short answer: Convert CLR types to database-compatible types and vice versa. Example: storing an enum as a string or encrypted data. Real-world example (ShopNest) ShopNest’s order service uses EF Core to save an Order an…

EF Core Read answer
Mid PDF
What are owned entity types? When to use them?

Short answer: Complex types that don’t have their own identity and lifecycle. Useful for grouping related properties (like Address inside a Customer). Real-world example (ShopNest) ShopNest’s order service uses EF Core t…

EF Core Read answer
Mid PDF
What are owned entity types?

Short answer: When to use them? Complex types that don’t have their own identity and lifecycle. Useful for grouping related properties (like Address inside a Customer). Real-world example (ShopNest) ShopNest’s order serv…

EF Core Read answer
Mid PDF
What are backing fields?

Short answer: Private fields in your entity class mapped by EF Core instead of public properties. Useful for encapsulating domain logic and controlling property access. Transactions, Concurrency, Security Example code Pr…

EF Core Read answer
Mid PDF
How does EF Core handle transactions?

Short answer: EF Core automatically wraps SaveChanges() calls in a transaction. Ensures all changes are committed atomically. For multiple SaveChanges() calls, transactions need manual handling. Real-world example (ShopN…

EF Core Read answer
Mid PDF
How to manually manage transactions?

Short answer: Rollback) Use DbContext.Database.BeginTransaction() to start a transaction. Call Commit() to save changes or Rollback() to undo. Real-world example (ShopNest) ShopNest’s order service uses EF Core to save a…

EF Core Read answer
Mid PDF
How to manually manage transactions?

Short answer: (BeginTransaction, Commit, Rollback) Use DbContext.Database.BeginTransaction() to start a transaction. Explain a bit more Call Commit() to save changes or Rollback() to undo. Useful for combining multiple o…

EF Core Read answer
Junior PDF
What is optimistic concurrency? How to implement it?

Short answer: Assumes conflicts are rare; detects conflicts when saving. Uses concurrency tokens (e.g., timestamp or row version) to detect if data was changed by another process. Say this in the interview Define — one c…

EF Core Read answer
Junior PDF
What is optimistic concurrency?

Short answer: How to implement it? Assumes conflicts are rare; detects conflicts when saving. Uses concurrency tokens (e.g., timestamp or row version) to detect if data was changed by another process. EF Core throws DbUp…

EF Core Read answer

Entity Framework Core Entity Framework Core Tutorial · EF Core

Short answer: Practical use cases. Properties not defined in your CLR classes but tracked by EF Core. Useful for storing metadata like CreatedBy, LastModified, or foreign keys without cluttering domain models.

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: A filter automatically applied to all queries on an entity. Useful for soft deletes, multi-tenancy (filtering by tenant ID), or data partitioning.

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: When/why to use it? A filter automatically applied to all queries on an entity. Useful for soft deletes, multi-tenancy (filtering by tenant ID), or data partitioning.

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 .AsNoTracking() for read-only queries. Avoid over-fetching: only select needed columns (Select). Use eager loading wisely (Include). Minimize round trips by batching operations. Use compiled queries for repeated query patterns.

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: EF Core batches multiple commands into a single database round trip when possible. Improves performance by reducing network overhead.

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 handle batch operations? EF Core batches multiple commands into a single database round trip when possible. Improves performance by reducing network overhead.

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 pagination (Skip, Take). Use streaming APIs like IAsyncEnumerable<T> with EF Core 5+. Avoid loading all data into memory at once.

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: EF Core doesn’t have built-in caching for query results. Use second-level caching libraries (like EFCoreSecondLevelCacheInterceptor). Use application-level caching (MemoryCache, Redis) strategically.

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 FromSqlRaw or ExecuteSqlRaw to execute raw SQL. Map results to entities or DTOs. Use for performance-critical or legacy operations not easily expressed in LINQ.

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: SQL Server, PostgreSQL, MySQL — differences, limitations? Providers abstract database-specific implementations. Each supports different features & SQL dialects. Some features may not be supported on all providers (e.g., some EF Core features are provider-specific).

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: Migrations support may be limited or unavailable. May require manual scripts or provider-specific tooling. Consider NoSQL-specific approaches for schema changes.

Real-world example (ShopNest)

When ShopNest adds a DiscountCode column, you create a migration, review the SQL, then apply it on staging before production.

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 shadow properties or explicit properties for timestamps. Override SaveChanges() to set audit fields. Use global query filters for soft delete support.

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: Mark entities as deleted without physically removing them. Implemented using a boolean flag and global query filters to exclude “deleted” records.

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: Implementation strategies in EF Core? Mark entities as deleted without physically removing them. Implemented using a boolean flag and global query filters to exclude “deleted” records.

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: EF Core can track foreign keys without them being defined in your model as properties. Useful for cleaner domain models.

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: Configure relationships explicitly. HasOne / WithMany to define navigation properties and cardinality. Offers fine control beyond Data Annotations.

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: Convert CLR types to database-compatible types and vice versa. Example: storing an enum as a string or encrypted data.

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: Complex types that don’t have their own identity and lifecycle. Useful for grouping related properties (like Address inside a Customer).

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: When to use them? Complex types that don’t have their own identity and lifecycle. Useful for grouping related properties (like Address inside a Customer).

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: Private fields in your entity class mapped by EF Core instead of public properties. Useful for encapsulating domain logic and controlling property access. Transactions, Concurrency, Security

Example code

Private fields in your entity class mapped by EF Core instead of public properties. Useful for encapsulating domain logic and controlling property access. Transactions, Concurrency, Security

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: EF Core automatically wraps SaveChanges() calls in a transaction. Ensures all changes are committed atomically. For multiple SaveChanges() calls, transactions need manual handling.

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: Rollback) Use DbContext.Database.BeginTransaction() to start a transaction. Call Commit() to save changes or Rollback() to undo.

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: (BeginTransaction, Commit, Rollback) Use DbContext.Database.BeginTransaction() to start a transaction.

Explain a bit more

Call Commit() to save changes or Rollback() to undo. Useful for combining multiple operations that should succeed or fail as a unit. using var transaction = context.Database.BeginTransaction(); try { // Perform multiple operations context.SaveChanges(); transaction.Commit(); } catch { transaction.Rollback(); throw; }

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: Assumes conflicts are rare; detects conflicts when saving. Uses concurrency tokens (e.g., timestamp or row version) to detect if data was changed by another process.

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 to implement it? Assumes conflicts are rare; detects conflicts when saving. Uses concurrency tokens (e.g., timestamp or row version) to detect if data was changed by another process. EF Core throws DbUpdateConcurrencyException if a conflict occurs.

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