/// <summary> /// Check if we need to create the stored procedure /// </summary> public bool NeedToCreateProcedure(DbCommandType commandType) { if (connection.State != ConnectionState.Open) { throw new ArgumentException("Here, we need an opened connection please"); } var commandName = this.sqlObjectNames.GetCommandName(commandType); return(!MySqlManagementUtils.ProcedureExists(connection, transaction, commandName)); }
/// <summary> /// Check if we need to create the stored procedure /// </summary> public bool NeedToCreateProcedure(DbCommandType commandType, DbBuilderOption option) { if (connection.State != ConnectionState.Open) { throw new ArgumentException("Here, we need an opened connection please"); } var commandName = this.sqlObjectNames.GetCommandName(commandType); if (option.HasFlag(DbBuilderOption.CreateOrUseExistingSchema)) { return(!MySqlManagementUtils.ProcedureExists(connection, transaction, commandName)); } return(false); }