Coforge .NET Full Stack Interview Questions & Answers
Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Coforge hiring for .NET Full Stack roles
Coforge, formerly NIIT Technologies, is an Indian IT services company focused on industries such as banking, insurance, and travel and transportation. It provides application development, testing, cloud, data and integration services. In India it hires for software engineers, test engineers, data analysts and data engineers.
For .NET Full Stack roles, this Coforge practice set focuses most on C# Fundamentals (7), OOP in C# (5), LINQ, Collections and Generics (4), Async Programming and Multithreading (4). It has 12 easy, 16 medium, 2 hard questions, so you can start easy and work up to the harder ones.
Company type
IT services
Headquarters
Noida, India
Main India offices
Noida, Greater Noida, Bengaluru, Pune, Hyderabad
Coforge .NET Full Stack interview process
Online assessment (aptitude + reasoning)
Technical MCQs or coding test
Technical interview
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for CoforgeStart 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
Write a LINQ query that joins orders with customers and returns customer name and order total.
var result = orders
.Join(customers,
o => o.CustomerId,
c => c.Id,
(o, c) => new { c.Name, o.Total })
.ToList();
// query syntax
var result2 = (from o in orders
join c in customers on o.CustomerId equals c.Id
select new { c.Name, o.Total }).ToList();
Join is an inner join. For a left join use GroupJoin with DefaultIfEmpty, or the LeftJoin operator added in .NET 10.
02
What is the difference between props and state in React?
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.
03
What is the difference between const, readonly and static readonly?
const is a compile-time constant, implicitly static, and its value is copied into calling assemblies, so changing it requires recompiling them. readonly fields are set at declaration or in the constructor and can differ per instance. static readonly is set once per type at runtime, so it can hold values like DateTime.Now or a new object. Use const only for values that will never change, such as Math.PI.
04
A developer wraps every database call in Task.Run inside ASP.NET Core controllers to make them async. Is this a good idea?
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.
05
What is the difference between concurrency and parallelism?
Concurrency means dealing with many tasks at once by interleaving them, for example a web server handling thousands of requests that mostly wait on I/O. Parallelism means doing many computations at the same instant on multiple cores, such as processing an image in four chunks. async/await gives concurrency; Parallel.For and PLINQ give parallelism. A program can be concurrent on a single core but parallel only with multiple cores.
06
Explain First, FirstOrDefault, Single and SingleOrDefault.
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.
07
Why do you want to work as a .NET full stack developer?
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.
08
Explain eager, lazy and explicit loading in EF Core.
Eager loading fetches related data in the same query using Include and ThenInclude, for example orders with their items. Lazy loading loads a navigation property automatically the first time you access it, requiring proxies and virtual properties; it is convenient but easily causes N+1 queries. Explicit loading loads a navigation on demand with Entry(order).Collection(o => o.Items).LoadAsync(). Projection with Select is often better than all three.
09
Show an example of the Dependency Inversion Principle in C#.
public interface INotifier { Task SendAsync(string to, string msg); }
public class SmsNotifier : INotifier
{
public Task SendAsync(string to, string msg) => Task.CompletedTask; // call SMS API
}
public class OrderService(INotifier notifier)
{
public Task ConfirmAsync(Order o) => notifier.SendAsync(o.Phone, "Order placed");
}
// Program.cs
builder.Services.AddScoped<INotifier, SmsNotifier>();
OrderService depends on the abstraction, so you can swap to email or a mock without changing it.
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.
11
What are the four pillars of object-oriented programming?
Encapsulation hides internal state behind methods and properties. Abstraction exposes only what the caller needs, using abstract classes and interfaces. Inheritance lets a class reuse and extend another class. Polymorphism lets one interface have many implementations, so code calls Pay() without knowing whether it is a card or UPI payment. Together they make code easier to change, test and reuse.
ref passes a variable by reference; it must be initialised before the call and the method can read and change it. out also passes by reference but need not be initialised, and the method must assign it before returning, as in int.TryParse. in passes by reference as read-only, which avoids copying large structs while preventing changes. Overusing ref and out makes code harder to read, so tuples are often cleaner.
13
What is the difference between DELETE, TRUNCATE and DROP?
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.
14
Your security team objects to storing the JWT in localStorage in your Angular app. What are the options?
localStorage is readable by any JavaScript on the page, so an XSS bug can steal the token. A safer pattern is to keep the short-lived access token in memory and store the refresh token in an HttpOnly, Secure, SameSite cookie that scripts cannot read. Even better is the backend-for-frontend pattern, where ASP.NET Core holds tokens server-side and the browser uses a session cookie. Add CSRF protection when using cookies.
15
What are DbContext and DbSet, and what lifetime should DbContext have?
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.
16
What is CORS and how do you enable it in ASP.NET Core?
Browsers block JavaScript from calling an API on a different origin (scheme, host or port) unless the server allows it via CORS headers. If an Angular app on localhost:4200 calls an API on localhost:5001, you add a policy with builder.Services.AddCors, allowing that origin with WithOrigins, plus required methods and headers, and call app.UseCors before authorization. Avoid AllowAnyOrigin in production, especially with credentials.
17
Show the difference between ROW_NUMBER, RANK and DENSE_RANK with a query.
SELECT Name, Department, Salary,
ROW_NUMBER() OVER (PARTITION BY Department ORDER BY Salary DESC) AS RowNum,
RANK() OVER (PARTITION BY Department ORDER BY Salary DESC) AS Rnk,
DENSE_RANK() OVER (PARTITION BY Department ORDER BY Salary DESC) AS DenseRnk
FROM Employees;
-- salaries 90, 90, 80 give
-- ROW_NUMBER: 1, 2, 3
-- RANK: 1, 1, 3
-- DENSE_RANK: 1, 1, 2
PARTITION BY restarts numbering for each department.
INNER JOIN returns rows that match in both tables. LEFT JOIN returns all rows from the left table plus matches from the right, with NULLs where there is no match. RIGHT JOIN is the mirror. FULL OUTER JOIN returns all rows from both sides. CROSS JOIN returns every combination. A self join joins a table to itself, such as employees to their managers. LEFT JOIN with WHERE right.Id IS NULL finds unmatched rows.
19
What are nullable value types and nullable reference types?
Nullable value types like int? wrap a struct so it can hold null, with HasValue and Value properties. Nullable reference types, enabled by <Nullable>enable</Nullable>, are a compile-time feature: string means non-null and string? means may be null, and the compiler warns when you dereference a possible null. They do not change runtime behaviour but catch many NullReferenceException bugs before deployment.
20
Show how to bind configuration from appsettings.json using the Options pattern.
// appsettings.json
// "Smtp": { "Host": "smtp.example.com", "Port": 587 }
public class SmtpOptions
{
public string Host { get; set; } = "";
public int Port { get; set; }
}
builder.Services.Configure<SmtpOptions>(builder.Configuration.GetSection("Smtp"));
public class EmailService(IOptions<SmtpOptions> options)
{
private readonly SmtpOptions _smtp = options.Value;
}
appsettings.{Environment}.json and environment variables override base values. Use IOptionsMonitor to pick up changes without restart.
21
What is the difference between a Task and a Thread?
A Thread is an OS-level execution unit with its own stack, costly to create. A Task is a higher-level promise of work that may or may not use a thread; I/O tasks often use no thread while waiting, and CPU tasks run on pooled threads. Tasks support return values, continuations, cancellation, exceptions and composition with WhenAll. In modern .NET you almost always use Tasks rather than creating threads manually.
Func<decimal, decimal> addGst = price => price * 1.18m;
Action<string> log = msg => Console.WriteLine($"[LOG] {msg}");
Predicate<int> isAdult = age => age >= 18;
decimal total = addGst(1000m); // 1180
log($"Total {total}");
bool ok = isAdult(21); // true
Func returns a value (last type argument is the return type), Action returns void, and Predicate<T> returns bool. They save you from declaring custom delegate types.
23
Tell me about a time you refactored messy code that others depended on.
In my last project (Situation) an invoice module had one 900-line class with duplicated GST logic. My task was to add a new tax rule without breaking billing. I first wrote unit tests around current behaviour, then extracted tax rules into strategy classes and moved data access into a repository, merging in small pull requests. Result: the new rule took one day, and bugs in that module dropped noticeably the next quarter.
The Common Language Runtime is the execution engine of .NET. It loads compiled IL code, converts it to machine code with the JIT compiler, manages memory through the garbage collector, enforces type safety, handles exceptions and manages threads. Because every .NET language compiles to the same IL, C#, F# and VB.NET code can run on the same CLR and call each other.
25
What is the difference between JIT compilation and Native AOT in .NET?
With JIT, the app ships as IL and the runtime compiles methods to machine code when first called; tiered compilation later recompiles hot methods with better optimisation. Native AOT compiles everything ahead of time into a single native executable, giving very fast startup and lower memory, which suits containers and serverless. The trade-off is limited reflection and dynamic code generation, so some libraries need source generators to work.
// run three independent calls in parallel
var userTask = userApi.GetAsync(id);
var ordersTask = orderApi.GetAsync(id);
var walletTask = walletApi.GetAsync(id);
await Task.WhenAll(userTask, ordersTask, walletTask);
var dashboard = new Dashboard(userTask.Result, ordersTask.Result, walletTask.Result);
// timeout using WhenAny
var work = SlowCallAsync();
if (await Task.WhenAny(work, Task.Delay(2000)) != work)
throw new TimeoutException();
WhenAll completes when all finish; WhenAny returns the first task to finish.
27
What is the difference between Select and SelectMany?
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.
28
What are signals in Angular and why were they introduced?
Signals are reactive values: count = signal(0) holds state, computed() derives values and effect() runs side effects when dependencies change. Angular knows exactly which parts of the view read which signal, so it updates only those parts instead of checking the whole component tree. This enables zoneless change detection, which became the default for new apps in Angular 21, and gives simpler state handling than RxJS for local UI state.
29
What is the difference between compile-time and runtime polymorphism?
Compile-time, or static, polymorphism is resolved by the compiler, mainly through method overloading and operator overloading, and through generics. Runtime, or dynamic, polymorphism is resolved when the program runs, through virtual methods and interfaces: a Shape reference may call Circle.Area or Square.Area depending on the actual object. Runtime polymorphism is what makes plugin designs and dependency injection possible.
30
Write a switch expression using pattern matching to calculate shipping cost.
decimal Shipping(Order o) => o switch
{
{ Total: >= 1000 } => 0m,
{ Country: "IN", Weight: < 2 } => 49m,
{ Country: "IN" } => 99m,
{ Weight: > 20 } => throw new ArgumentException("Too heavy"),
_ => 499m
};
Property and relational patterns replace long if-else chains, and the compiler warns if cases are not exhaustive.
Tips to crack the Coforge .NET Full Stack interview
Learn travel and insurance domain basics like bookings, policy lifecycle and claims, which are key Coforge verticals.
Revise SQL, Java or Python and testing concepts for the technical interview.
Know that Coforge was earlier called NIIT Technologies and be able to describe its industry-focused strategy.
Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
Practise the hard questions on this page aloud; Coforge interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Coforge .NET Full Stack interview?
Candidates usually go through 4 stages: Online assessment (aptitude + reasoning); Technical MCQs or coding test; Technical interview; HR round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.
Which topics should I prepare for the Coforge .NET Full Stack interview?
This practice set leans on C# Fundamentals (7), OOP in C# (5), LINQ, Collections and Generics (4), Async Programming and Multithreading (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Coforge interviewers ask you to walk through real work.
Are these the exact questions asked at Coforge?
No. These are curated practice questions that match the skills and difficulty usually tested in it services interviews like Coforge's. They are not a leaked or verified list of past questions.
Where does Coforge hire .NET Full Stack professionals in India?
Coforge has large teams in Noida, Greater Noida, Bengaluru, Pune, Hyderabad. Openings and locations change often, so check the Coforge careers page and filter by city and experience.