protected BaseController() { _headTagbuilder = DependencyResolver.Current.GetService <IHeadTagBuilder>(); _sessionContext = DependencyResolver.Current.GetService <ISessionContext>(); // the below check is added to prevent the multiple calls to SetDataLayerSessionVariables in a single request if (!_headTagbuilder.DataLayerKeyExists("SessionId") && !IsAjaxRequest()) { SetDataLayerSessionVariables(); } }
protected BaseController() { _headTagbuilder = DependencyResolver.Current.GetService <IHeadTagBuilder>(); _sessionContext = DependencyResolver.Current.GetService <ISessionContext>(); SetDataLayerSessionVariables(); }