Exemplo n.º 1
0
 public SqlFromClause(Type type)
 {
     PersistentClass persistentClassAttribute = (PersistentClass)type.GetCustomAttributes(typeof(PersistentClass), false).Single();
     if (persistentClassAttribute.HasPersistentBaseClass == true)
     {
         this.m_HasJoin = true;
         Type baseType = type.BaseType;
         PersistentClass baseClassAttribute = (PersistentClass)type.BaseType.GetCustomAttributes(typeof(PersistentClass), false).Single();
         this.m_From = "From " + persistentClassAttribute.BaseStorageName;
         this.m_Join = new SqlJoinClause(baseType, type);
     }
     else
     {
         this.m_HasJoin = false;
         this.m_From = "From " + persistentClassAttribute.StorageName;
     }
 }
Exemplo n.º 2
0
        public SqlFromClause(Type type)
        {
            PersistentClass persistentClassAttribute = (PersistentClass)type.GetCustomAttributes(typeof(PersistentClass), false).Single();

            if (persistentClassAttribute.HasPersistentBaseClass == true)
            {
                this.m_HasJoin = true;
                Type            baseType           = type.BaseType;
                PersistentClass baseClassAttribute = (PersistentClass)type.BaseType.GetCustomAttributes(typeof(PersistentClass), false).Single();
                this.m_From = "From " + persistentClassAttribute.BaseStorageName;
                this.m_Join = new SqlJoinClause(baseType, type);
            }
            else
            {
                this.m_HasJoin = false;
                this.m_From    = "From " + persistentClassAttribute.StorageName;
            }
        }