Skip to content

.NET Full-Stack Interview: C#, SQL, Web API & React Concepts Explained

C# Fundamentals

IEnumerable vs IQueryable

The candidate explained the core difference: IEnumerable deals with in-memory collections and uses deferred execution, while IQueryable works with database queries and executes on the server side. This makes IQueryable more performant for database operations because filtering happens before data is loaded into memory. For more details on similar concepts, check out the Top 30 JavaScript Interview Questions with Expert Answers for a broader perspective.

Boxing and Unboxing

  • Boxing: Converting a value type (e.g., int) to a reference type (object)
  • Unboxing: Converting a reference type back to a value type
  • Real-world example: The ArrayList collection, where adding elements boxes value types and retrieving them unboxes them back

Async/Await Internals

The async keyword marks a method as asynchronous. When the await keyword is encountered, the compiler knows to wait for the result without blocking the OS thread. The remaining code executes once the awaited task completes.

Task vs Thread vs ThreadPool

  • Thread: The smallest execution unit, managed manually by the OS
  • ThreadPool: A pre-created pool of threads managed by the .NET CLR automatically
  • Task: A high-level abstraction over ThreadPool, used with async/await

Dependency Injection (DI)

A design pattern for loose coupling where classes receive dependencies from outside rather than creating them internally. In .NET, services are registered in Program.cs and injected via constructors into controllers or service layers. For more architectural patterns, see Understanding Hexagonal Architecture: Transforming MVC Applications.

Abstract Class vs Interface

  • Abstract Class: Contains both concrete and abstract methods; used for shared implementation and common logic
  • Interface: A contract with only method declarations; used for multiple inheritance and DI

Garbage Collection

An automated memory cleanup process run by the CLR. It uses three generations:

  • Gen 0: Short-lived objects (cleaned frequently)
  • Gen 1: Survivors from Gen 0
  • Gen 2: Long-lived objects (global variables, caching, logging)

LINQ: Deferred vs Immediate Execution

  • Deferred Execution: Query is defined but executes only when iterated (IEnumerable)
  • Immediate Execution: Query executes immediately with methods like .ToList() or .ToArray() (IQueryable)

First vs FirstOrDefault vs Single

  • First(): Returns first matching record; throws exception if none found
  • FirstOrDefault(): Returns first match or null
  • Single(): Expects exactly one match; throws exception for zero or multiple matches
  • SingleOrDefault(): Returns exactly one match or null; throws for multiple matches

.NET Core & Web API

.NET Framework vs .NET Core vs .NET 6+

  • .NET Framework: Windows-only, legacy
  • .NET Core: Cross-platform (Windows, Linux, macOS)
  • .NET 6+: Enhanced with cloud support (Docker, microservices)

Middleware Pipeline

A series of software components that process HTTP requests and responses. Middleware can handle authentication, authorization, and route requests to the correct controller using UseAuthentication() and MapControllers().

DI Lifecycle Methods

  • Transient (AddTransient): New instance per request (good for stateless operations)
  • Scoped (AddScoped): One instance per HTTP request (used for DbContext, repositories)
  • Singleton (AddSingleton): One instance for the entire application lifetime (caching, logging)

Key Insight: Injecting a scoped service into a singleton extends its lifetime to the entire application, which can cause issues.

JWT Authentication Flow

  1. Client sends credentials (username/password)
  2. Server validates and issues a token containing claims (user info, roles)
  3. Token is stored client-side (session storage, local storage, or cookies)
  4. Subsequent requests include the token for authorization

Authentication vs Authorization

  • Authentication: Verifies identity ("Who are you?")
  • Authorization: Determines permissions ("What can you do?")

Repository Pattern

Acts as a bridge between the data access layer and the database. It promotes loose coupling, improved security, and cleaner code by exposing only interfaces rather than direct database operations.

Entity Framework Core

An object-relational mapper (ORM) that allows writing SQL-like queries in C# using LINQ. It supports migrations and connects .NET code directly to the database.

API Versioning

Used when adding new features to existing APIs. URL versioning is common, where the version is included in the URL path so old clients can still access their version.

Caching

Stores frequently accessed data to avoid repeated database calls, improving performance. Can be implemented at multiple levels (controller, service, middleware).

SQL

Clustered vs Non-Clustered Index

  • Clustered Index: Physically sorts and stores data directly in the table; associated with the primary key
  • Non-Clustered Index: Stores pointers to data; useful for frequently queried columns (e.g., name, email)

Normalization

A design technique to reduce redundancy by breaking large tables into smaller ones:

  • 1NF: Every column must contain atomic values
  • 2NF: Satisfies 1NF + no partial dependencies
  • 3NF: Satisfies 2NF + no transitive dependencies
  • BCNF: Higher level of 3NF

DELETE vs TRUNCATE vs DROP

  • DELETE: Removes specific rows (can be rolled back in a transaction)
  • TRUNCATE: Removes all rows quickly but retains table structure (limited rollback)
  • DROP: Removes the entire table structure and data (cannot be rolled back)

SQL Joins

  • INNER JOIN: Returns matching records from both tables
  • LEFT JOIN: Returns all records from the left table; non-matches show as NULL
  • RIGHT JOIN: Returns all records from the right table; non-matches show as NULL
  • FULL JOIN: Returns all records from both tables; non-matches show as NULL

Stored Procedures vs Functions

  • Stored Procedure: Can perform CRUD operations and handle complex business logic
  • Function: Returns a single value or table; used in SELECT queries; cannot perform insert/update/delete

Transactions & ACID Properties

  • Atomicity: All operations complete or none do
  • Consistency: System remains in a valid state after the transaction
  • Isolation: Transactions are independent of each other
  • Durability: Completed transactions persist even after system failure

ReactJS

Virtual DOM

A lightweight copy of the real DOM. React uses a diffing algorithm to compare the previous and current virtual DOM, then updates only the changed elements in the real DOM (reconciliation). This makes React faster than direct DOM manipulation.

useState vs useEffect

  • useState: Manages local component state (data and setter function)
  • useEffect: Handles side effects (API calls, subscriptions) and lifecycle methods via dependency arrays

Controlled vs Uncontrolled Components

  • Controlled: Form data managed by React state (useState); ideal for complex forms
  • Uncontrolled: Form data managed by the DOM directly (useRef); simpler but less maintainable

Props vs State

  • Props: Immutable data passed from parent to child components
  • State: Mutable data managed within the component; changing state triggers re-renders

React Lifecycle (Functional Components)

  • Mounting: Achieved with useEffect and an empty dependency array (componentDidMount)
  • Updating: Achieved with useEffect and a dependency array with state variables (componentDidUpdate)
  • Unmounting: Achieved with the return function inside useEffect (componentWillUnmount)

Redux

A global state management library with four core concepts:

  1. Store: Holds the global state
  2. Dispatch: Triggers an action from a component
  3. Reducer: Contains logic to update the state based on the action
  4. State Update: Causes re-renders

Keys in Lists

Keys provide a unique identifier for each item in a list, helping React efficiently update and re-render collections. Non-unique keys can lead to unexpected behavior.

Code Splitting

Breaking large code blocks into smaller chunks to enable lazy loading. This loads essential content first and delays less critical operations (like API calls), improving initial load time.

For a comprehensive list of .NET and React interview topics, you might also be interested in the Top 10 Angular Interview Questions for Beginners and Juniors and the 25 Essential Angular Interview Questions with Code Demonstrations. Additionally, the Modern Next.js 2025 Tutorial: Complete Full-Stack Framework Overview provides insight into modern full-stack development.

Keep this summary

Save it to LunaNotes and it becomes a real note in your library — editable, searchable, and ready to turn into flashcards or a diagram. Free to start.

Save to LunaNotes

Or summarise for another video.

32K+ people have turned 65K+ videos into notes

“Very useful tool. I'm using it for the last couple weeks and I'm loving it so far. Makes learning on YouTube a great experience.”
Bhai Chrome Web Store review

This summary and transcript were automatically generated using AI with the Free YouTube transcript summary tool by LunaNotes.

Related summaries

Modern Next.js 2025 Tutorial: Complete Full-Stack Framework Overview

Modern Next.js 2025 Tutorial: Complete Full-Stack Framework Overview

This comprehensive overview covers the latest Next.js features including Server Components, Server Actions, AI coding agent support, partial pre-rendering (PPR), and the new proxy system. Perfect for beginners and experienced developers looking to understand Next.js fundamentals like data fetching, caching with `use cache`, routing, authentication, and deployment options.

9 JavaScript Topics You Must Know Before Learning React in 2024

9 JavaScript Topics You Must Know Before Learning React in 2024

Mastering React starts with solid JavaScript fundamentals. This guide covers 9 essential topics—from ES6 features like destructuring and arrow functions to promises, async/await, and error handling—that you need before diving into React. Perfect for front-end developers preparing for their React journey.

Frontend Web Development Masterclass: HTML, CSS, and JavaScript for Beginners

Frontend Web Development Masterclass: HTML, CSS, and JavaScript for Beginners

Learn the fundamentals of frontend web development from scratch in this comprehensive Hindi tutorial. Master HTML structure, CSS styling, and JavaScript interactivity to build your first professional website.

Top 30 JavaScript Interview Questions with Expert Answers

Top 30 JavaScript Interview Questions with Expert Answers

Master JavaScript interviews with this comprehensive guide featuring 30 commonly asked questions ranging from basics to advanced concepts. Gain insights on topics like hoisting, closures, promises, async/await, event delegation, and more, supported by clear examples and best practices for both beginners and experienced developers.

Understanding Cloud Code Rendering Challenges and React's Role in Terminal UIs

Understanding Cloud Code Rendering Challenges and React's Role in Terminal UIs

Explore the technical intricacies behind Cloud Code's terminal UI performance issues, React's application in terminal rendering, and the challenges of updating terminal interfaces efficiently. Learn why React was chosen despite performance trade-offs and how terminal limitations influence UI design decisions.

Found this summary useful?

Take it with you. One click puts it in your own LunaNotes library.

Save to LunaNotes

Start taking better notes today with LunaNotes