/// <summary> /// Appends the current table alias, e.g. <c>T0</c>, to the attribute buffer. /// </summary> /// <param name="attribute">The current attribute.</param> /// <returns>A new attribute containing the appended buffer.</returns> public static IProjectionAttribute Ali(this IProjectionAttribute attribute) { ITableMetadata table = ProjectionHelper.GetTableMetadata(attribute); string alias = attribute.Context.Lookup.Table(attribute.Identity, table.Identity); return(attribute.Append(alias)); }
/// <summary> /// Appends the current table name, e.g. <c>"MyTable"</c>, to the attribute buffer. /// </summary> /// <param name="attribute">The current attribute.</param> /// <returns>A new attribute containing the appended buffer.</returns> public static IProjectionAttribute TblName(this IProjectionAttribute attribute) { ITableMetadata table = ProjectionHelper.GetTableMetadata(attribute); string qualifier = attribute.Context.Domain.Dialect.Qualifier; string tableName = string.Join(qualifier, table.TableName.Select(attribute.Context.Domain.Dialect.Identifier)); return(attribute.Append(tableName)); }