示例#1
0
        public string GetEntityPreferenceValue(EntityPreference.CodeEnum code)
        {
            if (entityPreferenceCache == null)
            {
                LoadEntityPreferenceCache();
            }

            return entityPreferenceCache[code];
        }
示例#2
0
        public override bool Equals(object obj)
        {
            EntityPreference another = obj as EntityPreference;

            if (another == null)
            {
                return(false);
            }
            else
            {
                return(this.Id == another.Id);
            }
        }
示例#3
0
 public string GetEntityPreferenceValue(EntityPreference.CodeEnum code, bool useCache = true)
 {
     if(useCache)
     {
         if(entityPreferenceCache == null)
         {
             LoadEntityPreferenceCache();
         }
         return entityPreferenceCache[code];
     }
     else
     {
         IList<EntityPreference> epList = queryMgr.FindAll<EntityPreference>(
             "from EntityPreference where Id = ? ", code, 0, 1);
         return epList.First().Value;
     }
 }