Esempio 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>();
 }
Esempio 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);
            }
        }
Esempio 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();
        }