private string GetTableName() { if (_isSubQuery) { return(_tableNames.First()); } var joinExpression = string.Join(" ", _joinExpressions); return(string.Format("{0} {1}", _adapter.Table(_tableNames.First(), _schema), joinExpression)); }
public SqlBuilder(ISqlAdapter adapter, bool isEnableAlias = true) { var table = CacheHelper.GetTableInfo(typeof(T)); Where = new StringBuilder(); Parameters = new DynamicParameters(); SelectField = new List <string> { "*" }; TableAliasName = table.Alias; IsEnableAlias = isEnableAlias; Adapter = adapter; Table = isEnableAlias ? Adapter.Table(table.Name, table.Alias) : Adapter.Table(table.Name); }
private string GetTableName() { var joinExpression = string.Join(" ", _joinExpressions); return(string.Format("{0} {1}", _adapter.Table(_tableNames.First()), joinExpression)); }