protected sealed override void InitialiseConfig() { Specification = new SelectStatementSpecification(); var type = typeof(TEntity); var tables = Specification.Tables; var tableSpecification = new SelectStatementTableSpecification { EntityType = type, Schema = "dbo", TableName = CustomAttributeHandle.DbTableName <TEntity>() }; tables.Add(tableSpecification); }
protected override void AddTableSpecification <T>( JoinType joinType, string alias = null, string tableName = null, string tableSchema = null) { ThrowIfTableAlreadyJoined <T>(alias, tableName, tableSchema); var tables = Specification.Tables; var tableSpecification1 = new SelectStatementTableSpecification { Alias = alias, EntityType = typeof(T), JoinType = joinType, TableName = string.IsNullOrEmpty(tableName) ? CustomAttributeHandle.DbTableName <T>() : tableName, Schema = string.IsNullOrEmpty(tableSchema) ? CustomAttributeHandle.DbTableSchema <T>() : tableSchema }; var tableSpecification2 = tableSpecification1; tables.Add(tableSpecification2); }