Dotnet Interview
Dotnet Interview
How does async/await work in C#? What happens internally when you use it?
Explain how LINQ queries are executed. What’s the difference between
IEnumerable<T> and IQueryable<T>?
What is Dependency Injection (DI) in ASP.NET Core? How does it improve code
maintainability?
Can you explain middleware in ASP.NET Core? How do you create a custom
middleware?
What are Minimal APIs in .NET 6/7? When would you use them instead of MVC?
What are source generators in C#? How do they improve performance and reduce
runtime overhead?
Explain the performance improvements introduced in .NET 6/7/8.
What is FileScopedNamespace in .NET 6, and why was it introduced?
6. Security Practices (Authentication, Authorization, Secure Coding)
How would you secure an ASP.NET Core Web API from unauthorized access?
What are some common security vulnerabilities in .NET applications, and how do you
prevent them?
How does OAuth2 and JWT work for authentication in .NET applications?
How would you prevent SQL Injection and Cross-Site Scripting (XSS) in a .NET
application?