.NET Core and Framework
What are the key differences between .NET Core and .NET Framework?
Explain the role of the Common Language Runtime (CLR) in .NET.
What is the purpose of the
IL
(Intermediate Language) in .NET?How does the .NET Garbage Collector work, and what are its generations?
What is the difference between
IIS
hosting andKestrel
in .NET Core?
Dependency Injection and Design Patterns
What is Dependency Injection (DI), and how is it implemented in .NET Core?
Explain the Singleton, Scoped, and Transient lifetimes in DI.
What are some common design patterns used in .NET applications?
How do you implement the Repository and Unit of Work patterns in .NET?
What is the difference between Factory and Abstract Factory patterns?
Entity Framework (EF)
What is the difference between Entity Framework Core and Entity Framework 6?
How do you handle migrations in Entity Framework Core?
What is the difference between
DbContext
andObjectContext
?How do you optimize performance in Entity Framework queries?
Explain the difference between eager loading, lazy loading, and explicit loading.
Asynchronous Programming
What is the purpose of
async
andawait
in .NET?How does the Task Parallel Library (TPL) work in .NET?
What is the difference between
Task
andValueTask
?How do you handle exceptions in asynchronous methods?
What is the role of
ConfigureAwait(false)
in async programming?
Web Development
What is the difference between Web API and MVC in .NET?
How do you implement authentication and authorization in ASP.NET Core?
What is middleware in ASP.NET Core, and how is it used?
How do you implement CORS (Cross-Origin Resource Sharing) in ASP.NET Core?
What is the difference between SignalR and gRPC in .NET?
Performance and Optimization
How do you profile and optimize a .NET application?
What are some best practices for improving application performance in .NET?
How do you implement caching in .NET Core?
What is the difference between
StringBuilder
andString
in terms of performance?How do you handle memory leaks in .NET applications?
Security
How do you implement JWT (JSON Web Token) authentication in .NET Core?
What is the difference between symmetric and asymmetric encryption?
How do you secure sensitive data in a .NET application?
What is the purpose of the
Data Protection
API in .NET Core?How do you prevent SQL injection in .NET applications?
Testing and Debugging
How do you write unit tests for .NET applications?
What is the purpose of
Moq
in unit testing?How do you debug a .NET application in Visual Studio?
What is the difference between integration testing and unit testing?
How do you test asynchronous methods in .NET?
Advanced Topics
What is the purpose of
Span<T>
andMemory<T>
in .NET?How do you implement global exception handling in ASP.NET Core?
What is the difference between
IEnumerable
,IQueryable
, andList
?How do you use
Reflection
in .NET, and what are its use cases?What is the purpose of
Polly
in .NET applications?