public static Dictionary <OperationSymbol, OperationHelp> CachedOperationsHelp() { return(Operations.Value.GetOrAdd(GetCulture(), ci => { var dic = Database.Query <OperationHelpEntity>().Where(n => n.Culture == ci.ToCultureInfoEntity()).ToDictionary(a => a.Operation); return OperationLogic.AllSymbols().ToDictionary(o => o, o => new OperationHelp(o, ci, dic.TryGetC(o))); }).Where(a => OperationLogic.OperationAllowed(a.Key, inUserInterface: true)).ToDictionary()); }
public static Dictionary <OperationSymbol, OperationAllowed> AllowedOperations() { return(OperationLogic.AllSymbols().ToDictionary(k => k, k => cache.GetAllowed(RoleEntity.Current, k))); }