// I can inject any service that is registered with dependency injection public DoSomethingElseService(DoSomethingService doSomethingService) { this.doSomethingService = doSomethingService; }
// This is called 'Constructor Injection' and it's the most common way of injecting services, you will see and use this A LOT' public App(DoSomethingService doSomethingService, IDoSomethingElseService doSomethingElseService) { this.doSomethingService = doSomethingService; this.doSomethingElseService = doSomethingElseService; }