Search Results for

    Show / Hide Table of Contents

    Class MySQLDbContextOptionsBuilder

    Represents the Microsoft.EntityFrameworkCore.Infrastructure.RelationalDbContextOptionsBuilder<TBuilder, TExtension> implementation for MySQL.

    Inheritance
    System.Object
    Microsoft.EntityFrameworkCore.Infrastructure.RelationalDbContextOptionsBuilder<MySQLDbContextOptionsBuilder, MySQLOptionsExtension>
    MySQLDbContextOptionsBuilder
    Implements
    Microsoft.EntityFrameworkCore.Infrastructure.IRelationalDbContextOptionsBuilderInfrastructure
    Namespace: MySql.EntityFrameworkCore.Infrastructure
    Assembly: MySql.EntityFrameworkCore.dll
    Version: 9.3.0
    Syntax
    public class MySQLDbContextOptionsBuilder : RelationalDbContextOptionsBuilder<MySQLDbContextOptionsBuilder, MySQLOptionsExtension>, IRelationalDbContextOptionsBuilderInfrastructure

    Constructors

    MySQLDbContextOptionsBuilder(DbContextOptionsBuilder)

    Initializes a new instance of the MySQLDbContextOptionsBuilder class.

    Declaration
    public MySQLDbContextOptionsBuilder(DbContextOptionsBuilder optionsBuilder)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.DbContextOptionsBuilder optionsBuilder

    The options builder.

    Methods

    EnableRetryOnFailure()

    Configures the context to use the default retrying Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy.

    Declaration
    public virtual MySQLDbContextOptionsBuilder EnableRetryOnFailure()
    Returns
    Type Description
    MySQLDbContextOptionsBuilder

    EnableRetryOnFailure(Int32)

    Configures the context to use the default retrying Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy.

    Declaration
    public virtual MySQLDbContextOptionsBuilder EnableRetryOnFailure(int maxRetryCount)
    Parameters
    Type Name Description
    System.Int32 maxRetryCount

    The maximum number of retry attempts.

    Returns
    Type Description
    MySQLDbContextOptionsBuilder

    EnableRetryOnFailure(Int32, TimeSpan, ICollection<Int32>)

    Configures the context to use the default retrying Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy.

    Declaration
    public virtual MySQLDbContextOptionsBuilder EnableRetryOnFailure(int maxRetryCount, TimeSpan maxRetryDelay, ICollection<int> errorNumbersToAdd)
    Parameters
    Type Name Description
    System.Int32 maxRetryCount

    The maximum number of retry attempts.

    System.TimeSpan maxRetryDelay

    The maximum delay between retries.

    System.Collections.Generic.ICollection<System.Int32> errorNumbersToAdd

    Additional SQL error numbers that should be considered transient.

    Returns
    Type Description
    MySQLDbContextOptionsBuilder

    Implements

    Microsoft.EntityFrameworkCore.Infrastructure.IRelationalDbContextOptionsBuilderInfrastructure
    In This Article
    • Constructors
      • MySQLDbContextOptionsBuilder(DbContextOptionsBuilder)
    • Methods
      • EnableRetryOnFailure()
      • EnableRetryOnFailure(Int32)
      • EnableRetryOnFailure(Int32, TimeSpan, ICollection<Int32>)
    • Implements
    Back to top Copyright © 2021, 2025, Oracle and/or its affiliates.