• Overview
  • MySQL Data
  • MySQL Entity Framework
  • MySQL Entity Framework Core
  • MySQL Web
  • MySQL Entity Framework Core
  • MySql.EntityFrameworkCore.Extensions
  • MySQLDatabaseFacadeExtensions
Search Results for

    Show / Hide Table of Contents
    • Microsoft.EntityFrameworkCore
      • MySQLDbContextOptionsExtensions
    • MySql.EntityFrameworkCore.DataAnnotations
      • MySQLCharsetAttribute
      • MySQLCollationAttribute
    • MySql.EntityFrameworkCore.Diagnostics
      • MySQLEventId
    • MySql.EntityFrameworkCore.Extensions
      • MySQLDatabaseFacadeExtensions
      • MySQLDbFunctionsExtensions
      • MySQLEntityTypeExtensions
      • MySqlIndexBuilderExtensions
      • MySQLIndexExtensions
      • MySQLKeyBuilderExtensions
      • MySQLKeyExtensions
      • MySQLMatchSearchMode
      • MySQLMigrationBuilderExtensions
      • MySQLModelBuilderExtensions
      • MySQLPropertyBuilderExtensions
      • MySQLPropertyExtensions
      • MySQLServiceCollectionExtensions
      • MySQLTypeBaseExtensions
    • MySql.EntityFrameworkCore.Infrastructure
      • MySQLDbContextOptionsBuilder
      • MySqlSchemaBehavior
      • MySQLSchemaNameTranslator
    • MySql.EntityFrameworkCore.Infrastructure.Internal
      • IMySQLOptions
      • MySQLOptionsExtension
    • MySql.EntityFrameworkCore.Metadata
      • MySQLValueGenerationStrategy
    • MySql.EntityFrameworkCore.Migrations.Operations
      • MySQLDropPrimaryKeyAndRecreateForeignKeysOperation
      • MySQLDropUniqueConstraintAndRecreateForeignKeysOperation
    • MySql.EntityFrameworkCore.Query
      • MySQLJsonString

    Class MySQLDatabaseFacadeExtensions

    MySQL specific extension methods for Microsoft.EntityFrameworkCore.DbContext.Database.

    Inheritance
    System.Object
    MySQLDatabaseFacadeExtensions
    Namespace: MySql.EntityFrameworkCore.Extensions
    Assembly: MySql.EntityFrameworkCore.dll
    Version: 9.3.0
    Syntax
    public static class MySQLDatabaseFacadeExtensions

    Methods

    IsMySql(DatabaseFacade)

    Indicates whether the database provider currently in use is the MySQL provider.

    This method can only be used after the Microsoft.EntityFrameworkCore.DbContext has been configured because it is only then that the provider is known. This method cannot be used in Microsoft.EntityFrameworkCore.DbContext.OnConfiguring(Microsoft.EntityFrameworkCore.DbContextOptionsBuilder) because this is where application code sets the provider to use as part of configuring the context.

    Declaration
    public static bool IsMySql(this DatabaseFacade database)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade database

    The facade from Microsoft.EntityFrameworkCore.DbContext.Database.

    Returns
    Type Description
    System.Boolean

    true if MySQL is being used; otherwise, false.

    In This Article
    • Methods
      • IsMySql(DatabaseFacade)
    Back to top Copyright © 2021, 2025, Oracle and/or its affiliates.