Skip to content

.NET Full Stack Interview Questions for 1 Year Experience

40 questions with answers for candidates with 1 year of experience — 20 easy, 20 medium.

What interviewers expect: 1 year experience

With one year of experience, interviewers expect you to have built real API endpoints. Questions cover controllers, model validation, DI lifetimes, EF Core relationships and migrations, LINQ, async and await basics, and front-end integration with Angular or React. Be ready to explain the features you delivered, the bugs you fixed and how your team uses Git and code reviews.

This set is weighted towards SQL Server and T-SQL (7), Angular and React Front End (7), LINQ, Collections and Generics (6), OOP in C# (5).

Web API endpoints EF Core CRUD Async basics Git and code reviews
Solved at this levelStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
3 questions free Unlock the rest in seconds
01

What is the difference between DELETE, TRUNCATE and DROP?

Save to ▾
Show answer
DELETE removes rows one by one, supports WHERE, fires triggers and is fully logged, so it is slower on big tables. TRUNCATE removes all rows by deallocating pages, is minimally logged, resets identity values and cannot have WHERE; it fails if foreign keys reference the table. DROP removes the whole table including structure, indexes and permissions. In SQL Server, both DELETE and TRUNCATE can be rolled back inside a transaction.
02

What are DbContext and DbSet, and what lifetime should DbContext have?

Save to ▾
Show answer
DbContext represents a session with the database: it holds configuration, the change tracker and connection handling. Each DbSet<T> property represents a table you can query and add to. DbContext is lightweight and not thread-safe, so it should be short-lived; in ASP.NET Core it is registered as scoped, one per request, via AddDbContext. For background services or Blazor, use IDbContextFactory to create contexts on demand.
03

What is a delegate in C#?

OOP in C#Medium
Save to ▾
Show answer
A delegate is a type-safe reference to a method with a specific signature, similar to a function pointer but checked by the compiler. You can pass methods as parameters, store them and call them later. Delegates can be multicast, holding several methods that run in order. Lambdas, LINQ, events and callbacks are all built on delegates, and the built-in Func and Action types cover most needs.
04

What is the difference between a primary key and a unique key in SQL Server?

Save to ▾
Show answer
Both enforce uniqueness. A table can have only one primary key, it cannot contain NULLs, and by default SQL Server creates a clustered index for it. A table can have many unique constraints, each allowing a single NULL in SQL Server, and they create non-clustered indexes by default. Use the primary key for row identity, such as EmployeeId, and unique keys for business rules like a unique email or PAN.
05

Why do you want to work as a .NET full stack developer?

Save to ▾
Show answer
I enjoy building complete features, from database to screen, and .NET lets me do that with one strong, typed language on the back end. It is widely used by IT services firms, banks and product companies in India, so there are steady opportunities. I have built projects with ASP.NET Core and React, and I like that the platform is open source, cross-platform and keeps improving every year.
06

What does the sealed keyword do?

Save to ▾
Show answer
A sealed class cannot be inherited, and a sealed override method cannot be overridden further in derived classes. Use it when a class is not designed for extension, such as a security-sensitive or immutable type; string is sealed for this reason. Sealing also lets the JIT devirtualise calls, giving small performance gains. Many teams seal classes by default and unseal only when inheritance is genuinely needed.
07

What is the difference between throw and throw ex inside a catch block?

Save to ▾
Show answer
throw rethrows the current exception and preserves the original stack trace, so logs show where the error really started. throw ex resets the stack trace to the catch block, hiding the real source. Always use throw when rethrowing. If you need more context, wrap it: throw new OrderException("Payment failed", ex), which keeps the original as InnerException. Also avoid catching Exception unless you log and rethrow.
08

What is the difference between reactive forms and template-driven forms in Angular?

Save to ▾
Show answer
Template-driven forms are defined mainly in HTML with ngModel and directives; they are quick for simple forms but harder to test. Reactive forms are defined in TypeScript with FormGroup, FormControl and Validators, giving explicit, strongly typed models, easy dynamic fields, custom and async validators, and straightforward unit testing. For enterprise apps such as loan application or KYC forms, reactive forms are the usual choice.
09

What types of filters exist in ASP.NET Core MVC?

Save to ▾
Show answer
Authorization filters run first and can block a request. Resource filters run before model binding, useful for caching. Action filters run before and after an action, for logging or validation. Exception filters handle errors thrown by actions. Result filters run around the result execution, for example to add headers. Filters apply globally, per controller or per action. Unlike middleware, they can access MVC details like action arguments.
10

What are your strengths and weaknesses as a developer?

Save to ▾
Show answer
My strength is that I go deep when debugging; I like reading execution plans and logs until I find the real cause, which has helped my team fix slow queries. A weakness was that I spent too long polishing code before asking for feedback. I now open small draft pull requests early and ask for review, which has made me faster and helped me learn from seniors sooner.
11

An admin page renders 20,000 rows in a table and the browser freezes. How do you fix it?

Save to ▾
Show answer
Do not send or render everything at once. Add server-side paging, sorting and filtering in the ASP.NET Core API so the page loads perhaps 50 rows at a time. If users truly need to scroll a long list, use virtual scrolling, such as Angular CDK virtual scroll or TanStack Virtual in React, so only visible rows exist in the DOM. Also use trackBy or keys, and debounce search inputs.
12

Explain the SOLID principles briefly.

OOP in C#Medium
Save to ▾
Show answer
Single Responsibility: a class has one reason to change. Open/Closed: extend behaviour without editing existing code. Liskov Substitution: derived types must work wherever the base type is expected. Interface Segregation: prefer small, focused interfaces over one fat interface. Dependency Inversion: depend on abstractions, not concrete classes. In ASP.NET Core, injecting IEmailSender into a controller instead of creating SmtpClient directly applies dependency inversion.
13

What is Entity Framework Core?

Save to ▾
Show answer
EF Core is Microsoft's object-relational mapper for .NET. It maps C# classes to database tables, translates LINQ queries into SQL, tracks changes to loaded objects and saves them with SaveChanges. It supports SQL Server, PostgreSQL, MySQL, SQLite, Cosmos DB and more through providers. It removes most hand-written data access code, while still allowing raw SQL when needed. EF Core 10 ships with .NET 10.
14

Explain First, FirstOrDefault, Single and SingleOrDefault.

Save to ▾
Show answer
First returns the first match and throws if none exists. FirstOrDefault returns the default value, null for classes, if none exists. Single expects exactly one match and throws if there are zero or more than one. SingleOrDefault returns default for zero but still throws for more than one. Use Single when duplicates would indicate a data bug, such as lookup by unique PAN number; otherwise FirstOrDefault is cheaper.
15

A job matches 2 lakh uploaded records against 2 lakh existing IDs using list.Where(x => existingIds.Contains(x.Id)) and takes minutes. What is wrong?

Save to ▾
Show answer
existingIds is a List, so Contains is O(n) and the whole operation becomes O(n x m), around 40 billion comparisons. Convert the IDs to a HashSet<int> first, making each lookup O(1) and the job run in milliseconds. If you also need associated data, build a Dictionary keyed by ID. Always check data structure complexity before parallelising or adding hardware.
16

What is the difference between CPU-bound and I/O-bound work, and how do you handle each in .NET?

Save to ▾
Show answer
CPU-bound work keeps the processor busy, like encryption, image processing or heavy calculations; speed it up with parallelism using Parallel.For, PLINQ or Task.Run in desktop apps. I/O-bound work spends most time waiting on databases, files or networks; handle it with async/await so threads are released while waiting. Choosing wrongly wastes resources, such as using Parallel.ForEach for HTTP calls or Task.Run around database queries.
17

How would you deploy an Angular or React front end together with an ASP.NET Core API?

Save to ▾
Show answer
Two common options exist. Build the SPA with ng build or npm run build and serve the static files from the API's wwwroot with UseStaticFiles and MapFallbackToFile, giving one deployment and no CORS. Or host the SPA separately on a CDN or static hosting such as Azure Static Web Apps and the API on App Service or containers, which scales independently. Use environment config for API URLs and a CI/CD pipeline for both.
18

Show how to implement IDisposable and use the using statement.

Save to ▾
Show answer
public class FileLogger : IDisposable { private readonly StreamWriter _writer = new("log.txt"); public void Log(string msg) => _writer.WriteLine(msg); public void Dispose() => _writer.Dispose(); } // using declaration disposes at end of scope using var logger = new FileLogger(); logger.Log("Started"); Dispose releases unmanaged resources such as file handles and connections deterministically instead of waiting for the GC.
19

What are record types and when would you use them?

Save to ▾
Show answer
Records are reference types (or record struct for value types) designed for immutable data. The compiler generates value-based equality, a readable ToString, a deconstructor and support for with-expressions that create a modified copy. A positional record is one line: public record Order(int Id, decimal Total). They suit DTOs, API responses, events and value objects, but not EF Core entities that need change tracking by identity.
20

What is SQL injection and how do you prevent it in a .NET application?

Save to ▾
Show answer
SQL injection happens when user input is concatenated into SQL text, letting attackers change the query, for example entering ' OR 1=1 -- in a login box. Prevent it by always using parameters: SqlCommand with SqlParameter, EF Core LINQ, FromSql with interpolation, or Dapper parameters. Also use least-privilege database accounts, validate input and never show raw database errors to users. Stored procedures help only if they also avoid dynamic SQL concatenation.
21

Show constructor chaining in C#.

Save to ▾
Show answer
public class Customer { public string Name { get; } public string City { get; } public Customer(string name) : this(name, "Unknown") { } public Customer(string name, string city) { Name = name; City = city; } } public class PremiumCustomer : Customer { public PremiumCustomer(string name) : base(name, "Delhi") { } } this() calls another constructor of the same class and base() calls the parent constructor, avoiding duplicated setup code.
22

What is ASP.NET Core and what are its main features?

Save to ▾
Show answer
ASP.NET Core is the open-source, cross-platform framework for building web APIs, MVC sites, Razor Pages, Blazor apps and real-time apps with SignalR on modern .NET. Key features are built-in dependency injection, a configurable middleware pipeline, the fast Kestrel web server, unified configuration and logging, and support for Docker and cloud hosting. It runs on Windows, Linux and macOS and consistently ranks among the fastest web frameworks.
23

What is the difference between var, dynamic and object?

Save to ▾
Show answer
var is implicitly typed: the compiler infers the real type at compile time, so it is fully type-safe. object is the base type of everything; you need casts to use specific members, and value types get boxed. dynamic skips compile-time checking and resolves members at runtime, so typos fail only when the code runs. Use var for readability, object rarely, and dynamic only for COM interop or truly dynamic data.
24

What is LINQ and why is it useful?

Save to ▾
Show answer
LINQ, Language Integrated Query, lets you query collections, databases, XML and other sources with the same C# syntax using methods like Where, Select, OrderBy and GroupBy. Queries are type-checked at compile time and read close to the intent, for example orders.Where(o => o.Total > 500).OrderBy(o => o.Date). With EF Core, the same LINQ expression is translated into SQL, so you rarely write raw SQL strings.
25

An API creates a new HttpClient inside a using block for every outgoing call, and under load you see socket exhaustion errors. How do you fix it?

Save to ▾
Show answer
Disposing HttpClient does not immediately free the underlying socket; connections stay in TIME_WAIT, so thousands of short-lived clients exhaust ports. A single static client fixes that but misses DNS changes. The recommended fix is IHttpClientFactory: register builder.Services.AddHttpClient<PaymentClient>() and inject the typed client. The factory pools and rotates handlers, and you can add resilience with Microsoft.Extensions.Http.Resilience for retries and timeouts.
26

What do async and await do in C#?

Save to ▾
Show answer
async marks a method that can contain await, and the compiler turns it into a state machine. await pauses the method until a Task finishes without blocking the thread; the thread returns to the pool to do other work and the method resumes later, often on another thread. It is ideal for I/O such as database calls, HTTP requests and file reads. An async method returns Task, Task<T> or ValueTask.
27

What is the difference between a static class and a singleton?

OOP in C#Medium
Save to ▾
Show answer
A static class cannot be instantiated, cannot implement interfaces and is initialised by the runtime; it suits stateless helpers like Math. A singleton is a normal class with exactly one instance, so it can implement interfaces, be passed as a parameter and be mocked in tests. In ASP.NET Core, you rarely write a singleton by hand; you register the class with AddSingleton and let the DI container manage its lifetime.
28

What is the difference between Select and SelectMany?

Save to ▾
Show answer
Select projects each element to one result, so a list of customers mapped to their orders gives a list of lists. SelectMany projects each element to a sequence and flattens all sequences into one, so customers.SelectMany(c => c.Orders) gives a single list of all orders. In EF Core, SelectMany over a navigation collection translates to a SQL join, which is handy for reports.
29

What are services and dependency injection in Angular?

Save to ▾
Show answer
A service is a class, marked @Injectable, that holds logic or data shared across components, such as API calls, authentication or a cart. Angular's DI creates the service and provides it to components that request it in the constructor or with the inject() function. With providedIn: 'root', one shared instance exists for the whole app. This keeps components focused on UI and makes logic easy to test.
30

A developer wraps every database call in Task.Run inside ASP.NET Core controllers to make them async. Is this a good idea?

Save to ▾
Show answer
No. Task.Run moves work to another thread pool thread, but the request still waits for it, so you use two threads instead of one and gain nothing. The database call itself is still blocking. The correct approach is to use true async APIs like ToListAsync and SaveChangesAsync, which release the thread during I/O. Task.Run makes sense mainly in desktop apps to keep the UI thread free.
31

Write a query to find duplicate email addresses and delete the extra rows, keeping the lowest Id.

Save to ▾
Show answer
-- find duplicates SELECT Email, COUNT(*) AS Cnt FROM Users GROUP BY Email HAVING COUNT(*) > 1; -- delete duplicates, keep lowest Id WITH d AS ( SELECT Id, ROW_NUMBER() OVER (PARTITION BY Email ORDER BY Id) AS rn FROM Users ) DELETE FROM d WHERE rn > 1; After cleanup, add a unique index on Email to stop duplicates returning.
32

Why should we hire you as a .NET full stack developer?

Save to ▾
Show answer
I can contribute on both sides of a feature: I have built ASP.NET Core APIs with EF Core and SQL Server, and front ends in Angular and React, and deployed them myself. I write clean, tested code and I am comfortable reading logs and execution plans when things break. I learn quickly, ask questions early and take ownership, so you can give me a module and trust that it will be completed properly.
33

What are generics and what benefits do they give?

Save to ▾
Show answer
Generics let you write classes and methods with a type parameter, such as List<T> or Repository<T>, that work with any type while staying type-safe. Benefits are compile-time checking instead of casts, no boxing for value types, and code reuse. For example, one generic Result<T> type can wrap any API response. The CLR creates specialised code for value types and shares code for reference types.
34

How do you use CancellationToken in an ASP.NET Core API?

Save to ▾
Show answer
[HttpGet("report")] public async Task<IActionResult> Report(CancellationToken ct) { var rows = await _db.Sales .Where(s => s.Year == 2026) .ToListAsync(ct); await _http.PostAsJsonAsync("/audit", rows.Count, ct); return Ok(rows); } ASP.NET Core binds the token to HttpContext.RequestAborted, so if the user closes the browser the token is cancelled and EF Core and HttpClient stop work, saving database and CPU time.
35

Why does using async in ASP.NET Core controllers improve scalability?

Save to ▾
Show answer
Each request needs a thread from the thread pool. If a controller blocks while waiting for SQL Server or an external API, that thread sits idle and cannot serve other users, so under load the pool runs out and requests queue. With async I/O, the thread is released during the wait and reused, so the same server handles many more concurrent requests. It does not make a single request faster.
36

Your Angular app's first load is slow on mobile because the main bundle is very large. How does lazy loading of routes help?

Save to ▾
Show answer
Lazy loading splits the app into chunks that download only when the user navigates to that route, so the initial bundle is smaller and the first page loads faster, especially on mobile data. In Angular use loadComponent or loadChildren with a dynamic import in the route config; in React use React.lazy with Suspense or the router's lazy option. Angular's @defer blocks can also delay heavy parts of a page.
37

What is the difference between props and state in React?

Save to ▾
Show answer
Props are inputs passed from a parent component to a child, like function arguments, and the child must not modify them. State is data owned and managed inside a component with useState or useReducer, and changing it re-renders the component. For example, a ProductCard receives product details as props, while a Cart component keeps the quantity in state. Shared state is lifted up to a common parent or moved into a store.
38

A query that used to run in 1 second now takes 30 seconds. How do you troubleshoot it?

Save to ▾
Show answer
Capture the actual execution plan and look for table or index scans on large tables, key lookups, big differences between estimated and actual rows, and warnings like implicit conversions or spills to tempdb. Check missing or fragmented indexes and outdated statistics, and update them. Use Query Store to compare the old and new plans; if a plan regressed, you can force the good plan while fixing the root cause.
39

Why is Any() usually better than Count() > 0?

Save to ▾
Show answer
Any() stops as soon as it finds one element, so it is O(1) for most sources, and in EF Core it translates to an efficient SQL EXISTS. Count() may need to walk the entire sequence or run COUNT(*) on the table, which is wasteful just to check for existence. For List<T> or arrays, the Count or Length property is also fine because it is stored, but Any() expresses the intent clearly.
40

What is the difference between a clustered and a non-clustered index?

Save to ▾
Show answer
A clustered index defines the physical order of the table's data, so the leaf level is the data itself, and a table can have only one. A non-clustered index is a separate structure with key values and a pointer back to the row, and a table can have many. Range queries on the clustered key are fast. Non-clustered indexes speed up searches on other columns but add cost to inserts and updates.

Frequently asked questions

What is asked in .NET Full Stack interviews for 1 year of experience?

With one year of experience, interviewers expect you to have built real API endpoints. Questions cover controllers, model validation, DI lifetimes, EF Core relationships and migrations, LINQ, async and await basics, and front-end integration with Angular or React. Be ready to explain the features you delivered, the bugs you fixed and how your team uses Git and code reviews.

How many questions should I practise before a .NET Full Stack interview?

Work through all 40 questions here, then the company-wise sets for the employers you are targeting. Quality matters more than count: be able to explain why each answer is right.

Which topics matter most for 1 year of experience?

Focus first on Web API endpoints, EF Core CRUD, Async basics, Git and code reviews.