Created
May 17, 2017 11:31
-
-
Save dmitry-zaets/8eed0adf66b0c384fc8b8d74b0bc6aed to your computer and use it in GitHub Desktop.
This file contains hidden or 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 ApiOptions _apiOptions; | |
public HomeController(IOptions<ApiOptions> apiOptions) | |
{ | |
_apiOptions= apiOptions.Value; | |
} | |
public IActionResult Index() | |
{ | |
return Content($"Api Name = {_apiOptions.Name}"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment