Ejemplo n.º 1
0
        /// <summary>
        /// Check if we need to create the stored procedure
        /// </summary>
        public async Task <bool> NeedToCreateProcedureAsync(DbCommandType commandType)
        {
            if (connection.State != ConnectionState.Open)
            {
                throw new ArgumentException("Here, we need an opened connection please");
            }

            var commandName = this.mySqlObjectNames.GetCommandName(commandType).name;

            return(!(await MySqlManagementUtils.ProcedureExistsAsync(connection, transaction, commandName).ConfigureAwait(false)));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Check if we need to create the stored procedure
        /// </summary>
        public async Task <bool> NeedToCreateProcedureAsync(DbCommandType commandType, DbConnection connection, DbTransaction transaction)
        {
            var commandName = this.mySqlObjectNames.GetCommandName(commandType).name;

            return(!await MySqlManagementUtils.ProcedureExistsAsync((MySqlConnection)connection, (MySqlTransaction)transaction, commandName).ConfigureAwait(false));
        }