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