Explore essential concepts in .NET backend development, from frameworks and HTTP handling to dependency injection and data access. Build foundational understanding for scalable and maintainable server-side applications.
Which framework is commonly used for building scalable RESTful APIs in .NET?
Explanation: ASP.NET Core is designed for building modern, scalable web APIs and backend services. Entity Framework is an ORM for database access, WPF is used for desktop GUI applications, and Blazor is primarily used for building interactive web UIs.
Which class in .NET is typically used to handle HTTP requests and responses in backend services?
Explanation: HttpClient is specifically made for sending HTTP requests and receiving responses. StreamReader deals with reading data streams, XmlDocument is for XML parsing, and Regex is for pattern matching in text.
What is the main benefit of using dependency injection in .NET backend applications?
Explanation: Dependency injection increases testability and makes code loosely coupled by controlling object creation. Faster network speed and automatic UI updates are unrelated, while code auto-generation is not the main purpose of dependency injection.
Which technology is commonly used in .NET to simplify database access in backend projects?
Explanation: Entity Framework is an object-relational mapper simplifying databasing in .NET. Windows Forms is for desktop GUIs, SignalR is for real-time communication, and DirectX is for graphics programming.
What feature in .NET backend development determines how HTTP requests are matched to controllers and actions?
Explanation: Routing maps incoming HTTP requests to the correct controller/action methods. Serialization is about data formats, globalization handles localization, and authentication is about user verification.