protected CrudHelper(T model, LuckIndiaDBContext context, bool shouldValidatePermissions = true) { this.Model = model; this.Context = context; this.ShouldValidatePermissions = shouldValidatePermissions; this.ModelClassId = ModelClassCachingService.GetCurrent().GetModelClassId <T>(); }
public static void Init() { var types = ModelClassCachingService.GetCurrent().GetModelTypes(); foreach (var modelType in types) { FindAllSubclassForModelType(modelType, typeof(RoleCollectionFilter <>), RoleCollectionFilters); FindAllSubclassForModelType(modelType, typeof(RoleTypeCollectionFilter <>), RoleTypeCollectionFilters); } }
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(); }