Ejemplo n.º 1
0
 protected CrudHelper(T model, LuckIndiaDBContext context, bool shouldValidatePermissions = true)
 {
     this.Model   = model;
     this.Context = context;
     this.ShouldValidatePermissions = shouldValidatePermissions;
     this.ModelClassId = ModelClassCachingService.GetCurrent().GetModelClassId <T>();
 }
Ejemplo n.º 2
0
        public static void Init()
        {
            var types = ModelClassCachingService.GetCurrent().GetModelTypes();

            foreach (var modelType in types)
            {
                FindAllSubclassForModelType(modelType, typeof(RoleCollectionFilter <>), RoleCollectionFilters);
                FindAllSubclassForModelType(modelType, typeof(RoleTypeCollectionFilter <>), RoleTypeCollectionFilters);
            }
        }
Ejemplo n.º 3
0
        public static void Init()
        {
            //Load all the caching services
            ApplicationCrudHooksCachingService.GetCurrent();
            ApplicationPermissionCachingService.GetCurrent();
            BusinessRulesCachingService.GetCurrent();
            CollectionFilterCachingService.GetCurrent();
            CrudHooksCachingService.GetCurrent();
            CrudRulesCachingService.GetCurrent();
            DataRulesCachingService.GetCurrent();
            ModelClassCachingService.GetCurrent();
            RolePermissionCachingService.GetCurrent();

            //run the old config...soon to be obsolete
            Config.Init();
        }