コード例 #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 void TableForEntity <TEntity>(this IDeleteExpressionRoot root) where TEntity : class, IEntity
        {
            var tableName = TableName.ForEntity <TEntity>();

            root.Table(tableName);
        }
コード例 #4
0
 public static IInSchemaSyntax Table <T>(this IDeleteExpressionRoot root)
 {
     return(root.Table(typeof(T).Name));
 }