Base solution for your next web application
BLACK FRIDAY
From Nov 21
To Dec 1
XXDAYS : XXHRS : XXMIN : XXSEC
SAVE UP TO$3K
Also valid for the
existing customers!
Open Closed

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


0
etshei created

Hi,

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?

Thanks


1 Answer(s)
  • 0
    hikalkan created
    Support Team

    That's a good way.