Created
May 30, 2020 15:50
-
-
Save corespider/82302de7e03c4cf358c2a3102edc9765 to your computer and use it in GitHub Desktop.
CoreSpider- IHostingEnvironment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HomeController : Controller | |
{ | |
private readonly ILogger<HomeController> _logger; | |
private IHostingEnvironment _environment; | |
public HomeController(ILogger<HomeController> logger, IHostingEnvironment environment) | |
{ | |
_logger = logger; | |
_environment = environment; | |
} | |
public IActionResult Index() | |
{ | |
string wwwPath = this._environment.WebRootPath; | |
string contentPath = this._environment.ContentRootPath; | |
return View(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment