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; } }
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; } }