Hi, I tried to access the services in the home controller but somehow it's not working
Startup.cs
- public void ConfigureServices(IServiceCollection services){
-
- services.AddTransient<IDummy, Dummy>(p => new Dummy()
- {
- name = "from injection"
- });
- }
HomeController.cs
- public IActionResult Index(IDummy dummy){
- var test = dummy.name;
- return this.View(HomeControllerAction.Index);
- }