public IActionResult Index([FromServices] IMyDepedencyService my_DepedencyService) { //_depedencyService.WriteMessage("this is from index method"); return(View()); //return Unauthorized(); //sreturn Content("IndexPage"); }
public HomeController(ILogger <HomeController> logger, IHostEnvironment hostEnvironment, IMyDepedencyService depedencyService, IMyDepedencyService myDepedencyService) { _hostEnvironment = hostEnvironment; _logger = logger; //depedencyService = new MyDepedencyService(); _depedencyService = depedencyService; }