Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

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


User avatar
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)
  • User Avatar
    0
    hikalkan created
    Support Team

    That's a good way.