Using Dependency Injection
Adam Freeman · Apress eBooks · 2020
Services are objects that are shared between middleware components and endpoints. There are no restrictions on the features that services can provide, but they are usually used for tasks that are needed in multiple parts of the application, such as logging or database access.