コード例 #1
0
        /// <summary>
        /// Specify the table to delete<br/>
        /// If <paramref name="migration"/>.SchemaPrefix have a value, the Syntax-OldName will be computed to {<paramref name="migration"/>.SchemaPrefix}{<paramref name="tableName"/>}<br/>
        /// If NOT, the Syntax-OldName will be the same as {<paramref name="tableName"/>}
        /// </summary>
        /// <param name="root">Expression root to extend</param>
        /// <param name="tableName">
        /// The table name to delete<br/>
        /// See summary-section how this parameter is used
        /// </param>
        /// <param name="migration"></param>
        /// <returns>The next step - <see cref="IInSchemaSyntax"/></returns>
        public static IInSchemaSyntax Table(this IDeleteExpressionRoot root, string tableName, IMigrationModel migration)
        {
            var syntax = root.Table(tableName.GetPrefixedName(migration?.SchemaPrefixId));

            syntax.InSchema(migration?.SchemaName);
            return(syntax);
        }
コード例 #2
0
 public static void Table(this IDeleteExpressionRoot syntax, string schema, string table)
 {
     syntax.Table(table).InSchema(schema);
 }
コード例 #3
0
 public static IDeleteIndexOnColumnSyntax Index(this IDeleteExpressionRoot syntax, string schema, string table, string index)
 {
     return(syntax.Index(index).OnTable(table).InSchema(schema));
 }
コード例 #4
0
        public static void TableForEntity <TEntity>(this IDeleteExpressionRoot root) where TEntity : class, IEntity
        {
            var tableName = TableName.ForEntity <TEntity>();

            root.Table(tableName);
        }
コード例 #5
0
ファイル: Extensions.cs プロジェクト: daolavi/Smarthub
        public static void ForeignKey(this IDeleteExpressionRoot delete, string colName, string sourceTable, string targetTable)
        {
            var fk = BuildForeignKeyName(sourceTable, targetTable, colName);

            delete.ForeignKey(fk).OnTable(sourceTable);
        }
コード例 #6
0
ファイル: SchemaExtensions.cs プロジェクト: alekshura/Ankara
 public static void AppSchema(this IDeleteExpressionRoot deleteExpressionRoot)
 {
     deleteExpressionRoot.Schema(Name);
 }
コード例 #7
0
 public static IInSchemaSyntax Table <T>(this IDeleteExpressionRoot root)
 {
     return(root.Table(typeof(T).Name));
 }