コード例 #1
0
        /// <summary>
        /// Creates a command which will delete all entities
        /// </summary>
        public static CommandDefinition MakeCreateTempTableCommand <TEntity>(
            IDbTransaction transaction,
            IDialect dialect,
            int?commandTimeout,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            var config = MicroCRUDConfig.Current;

            dialect = dialect ?? config.Dialect;
            var tableSchema = TableSchemaFactory.GetTableSchema(typeof(TEntity), dialect, config.SchemaFactory);
            var sql         = dialect.MakeCreateTempTableStatement(tableSchema);

            return(MakeCommandDefinition(sql, null, transaction, commandTimeout, cancellationToken));
        }