public IActionResult Index() { var output = @$ "First usage (in the controller): Transient service result: {transientNumberService.Number} Scoped service result: {scopedNumberService.Number} Singleton service result: {singletonNumberService.Number} Second usage (in the consumer service): Transient service result: {consumerService.GetNumberFromTransientService()} Scoped service result: {consumerService.GetNumberFromScopedService()} Singleton service result: {consumerService.GetNumberFromSingletonService()}"; return(Content(output)); }