protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); VariablesAplicacion.LoadOnInit(); Menu.CreateRolesMenu(); NHibernateManager.GetInstance().CerrarSessionInicioAplicacion(); CustomModelBindersConfig.RegisterCustomModelBinders(); }
public static void LoadOnInit() { roles = RolLogic.GetAllActivos(NHibernateManager.GetInstance().SessionInicioAplicacion); }
protected override void OnResultExecuted(ResultExecutedContext filterContext) { // -- Cierro la sesion abierta NHibernateManager.GetInstance().CloseSession(); base.OnResultExecuted(filterContext); }