public string AddWhereClauseForParentById(PrimaryKeyInfo primaryKey, string query, object id) { query = string.Format("{0} WHERE [{1}].[{2}] = @{3}", query, this.TableName, primaryKey.DataColumnName, primaryKey.DataColumnName); return(query); }
public TableInfo(Type table, string tableName, IMetadataStore metadataStore, PrimaryKeyInfo primaryKey, IEnumerable <ColumnInfo> columns, IEnumerable <ColumnInfo> references, IEnumerable <ColumnInfo> collections, IEnumerable <ColumnInfo> components) { this.Entity = table; this.MetadataStore = metadataStore; this.TableName = tableName; this.PrimaryKey = primaryKey; this.Columns = new List <ColumnInfo>(columns); this.References = new List <ColumnInfo>(references); this.Collections = new List <ColumnInfo>(collections); this.Components = new List <ColumnInfo>(components); this.isInitialized = true; this.Initialize(); }