Example #1
0
        public List <T> GetEntities <T>()
        {
            Type type = typeof(T);

            if (this[type] == null)
            {
                EntityCacheTypeAttribute attr = ClassFactory.GetObjectDescription(type, _ps).GetAttribute <EntityCacheTypeAttribute>();
                if (attr == null)
                {
                    _caches.Add(type, new EntityCache(type));
                }
                else
                {
                    _caches.Add(type, new EntityCache(attr.EntityCacheType));
                }
            }
            return(this[type].GetAll <T>());
        }
Example #2
0
 public List <EntityBase> GetEntities(Type type)
 {
     if (this[type] == null)
     {
         EntityCacheTypeAttribute attr = ClassFactory.GetObjectDescription(type, _ps).GetAttribute <EntityCacheTypeAttribute>();
         if (attr == null)
         {
             _caches.Add(type, new EntityCache(type));
         }
         else
         {
             _caches.Add(type, new EntityCache(attr.EntityCacheType));
         }
     }
     //List<Entity> list = new List<Entity>();
     return(this[type].GetAll());
     //return list;
 }