.NET track

.NET and C# interview questions

Panel-ready .NET / C# questions for freshers and experienced developers. Practice at Coding Cadre in Faridabad, or Online from Delhi NCR.

21 Moderate LINQ .NET

What is AsQueryable used for?

Short take Full answer on next page

Simple meaning

It treats an in-memory sequence as IQueryable so expression trees can be composed.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
23 Moderate ASP.NET .NET

How do you return file downloads from an API?

Short take Full answer on next page

Simple meaning

I return FileStreamResult or Results.File with the right content type and content-disposition.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
24 Moderate EF Core .NET

What is ExecuteUpdate and ExecuteDelete?

Short take Full answer on next page

Simple meaning

They run set-based updates and deletes without loading entities into memory.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
25 Moderate EF Core .NET

What does Include and ThenInclude do?

Short take Full answer on next page

Simple meaning

They eager-load related data in one query.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
28 Moderate Security .NET

How do you rotate Data Protection keys?

Short take Full answer on next page

Simple meaning

I store the key ring in a shared location and let new keys activate while old ones decrypt existing cookies.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
29 Moderate Testing .NET

What is Moq used for in .NET tests?

Short take Full answer on next page

Simple meaning

It creates stubs and verifies interactions on interfaces.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
30 Moderate Testing .NET

How do you test time-dependent code?

Short take Full answer on next page

Simple meaning

I inject an abstraction for UtcNow instead of DateTime.UtcNow directly.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
32 Moderate Logging .NET

What is log scoping in MEL?

Short take Full answer on next page

Simple meaning

BeginScope attaches properties to subsequent log calls in that block.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
35 Moderate C# .NET

What is CallerMemberName used for?

Short take Full answer on next page

Simple meaning

Attributes inject the caller name for INotifyPropertyChanged or logging helpers.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
36 Moderate EF Core .NET

What is a shadow property?

Short take Full answer on next page

Simple meaning

A field EF maps that does not exist on your CLR type, like UpdatedAt.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
37 Moderate API .NET

What is TypedResults in minimal APIs?

Short take Full answer on next page

Simple meaning

Helpers that return strongly typed IResult implementations for OpenAPI metadata.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
38 Moderate Threading .NET

What is PeriodicTimer in modern .NET?

Short take Full answer on next page

Simple meaning

An async-friendly timer that awaits ticks without callback reentrancy headaches.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
39 Moderate Testing .NET

What is Testcontainers used for in .NET?

Short take Full answer on next page

Simple meaning

It spins real Docker dependencies like Postgres for integration tests.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
40 Moderate ASP.NET .NET

What is OutputCache policy in .NET 7+?

Short take Full answer on next page

Simple meaning

Server-side caching of endpoint output with policies for duration and tags.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
Prev Page 2 of 4 Next
Chat with us