Base solution for your next web application
Open Closed

DI in Global.asax.cs (MvcController) #874

etshei created


I'm trying to use display prices by selecting curencies (like the localisation system), and i want to use a session variable to handle the ExchangeRate, so, i want to put this in the session_start method but i can't use DI until now in the Global.asax.cs (MvcController).

Right now, i'm using this block which is working:

using (var ratesService = IocManager.Instance.ResolveAsDisposable<IExchangeRateAppService>())

Is there another proper way to do it?


1 Answer(s)
  • 0
    hikalkan created
    Support Team

    That's a good way.