In ASP.NET MVC 5 is possible to obtain some dependency through DependencyResolver.Current.GetService(). Is there something similar in ASP.NET Core?
DependencyResolver.Current.GetService()
I also want to add to the main answer, In razor view pages we can use @inject directive for DI. It will retrieve the targeted services to view pages on Asp.Net core, like this
@inject XYZ.Web.Services.CurrencyService currencyService;