LyraLearn AI Learning Platform
Exams
← Back to the lesson
Module 6 Β· Quiz

Services and Interfaces

1. What is the primary purpose of defining interfaces for services in the service layer?
2. Which lifetime should be used for HttpContext in ASP.NET Core DI?
3. What does a service locator pattern do that is discouraged in dependency injection?
4. What is a common mistake when configuring singleton services in relation to scoped dependencies?