• Overview
  • MySQL Data
  • MySQL Entity Framework
  • MySQL Entity Framework Core
  • MySQL Web
  • MySQL Entity Framework Core
  • MySql.EntityFrameworkCore.Extensions
  • MySQLPropertyExtensions
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 MySQLPropertyExtensions

    Extension methods for Microsoft.EntityFrameworkCore.Metadata.IProperty for MySQL metadata.

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

    Methods

    GetCharSet(IReadOnlyProperty)

    Returns the name of the character set used by the column of the property.

    Declaration
    public static string GetCharSet(this IReadOnlyProperty property)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property

    The property that defines a column's character set.

    Returns
    Type Description
    System.String

    The name of the charset or null, if no explicit charset was set.

    GetValueGenerationStrategy(IReadOnlyProperty, StoreObjectIdentifier)

    Returns the MySQLValueGenerationStrategy to use for the property.

    If no strategy is set for the property, then the strategy to use will be taken from the Microsoft.EntityFrameworkCore.Metadata.IModel.

    Declaration
    public static MySQLValueGenerationStrategy? GetValueGenerationStrategy(this IReadOnlyProperty property, StoreObjectIdentifier storeObject = default(StoreObjectIdentifier))
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property
    Microsoft.EntityFrameworkCore.Metadata.StoreObjectIdentifier storeObject
    Returns
    Type Description
    System.Nullable<MySQLValueGenerationStrategy>

    The strategy, or None if none was set.

    GetValueGenerationStrategyConfigurationSource(IConventionProperty)

    Returns the Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource for the MySQLValueGenerationStrategy.

    Declaration
    public static ConfigurationSource? GetValueGenerationStrategyConfigurationSource(this IConventionProperty property)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property

    The property.

    Returns
    Type Description
    System.Nullable<Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource>

    The Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource for the MySQLValueGenerationStrategy.

    IsCompatibleAutoIncrementColumn(IReadOnlyProperty)

    Returns a value indicating whether the property is compatible with an AUTO_INCREMENT column.

    Declaration
    public static bool IsCompatibleAutoIncrementColumn(IReadOnlyProperty property)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property

    The property.

    Returns
    Type Description
    System.Boolean

    true if compatible.

    IsCompatibleComputedColumn(IReadOnlyProperty)

    Indicates whether the property is compatible with ComputedColumn.

    Declaration
    public static bool IsCompatibleComputedColumn(IReadOnlyProperty property)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property

    The property.

    Returns
    Type Description
    System.Boolean

    true if compatible; otherwise, false.

    IsCompatibleCurrentTimestampColumn(IReadOnlyProperty)

    Returns a value indicating whether the property is compatible with a CURRENT_TIMESTAMP column default.

    Declaration
    public static bool IsCompatibleCurrentTimestampColumn(IReadOnlyProperty property)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property

    The property.

    Returns
    Type Description
    System.Boolean

    true if compatible.

    IsCompatibleIdentityColumn(IReadOnlyProperty)

    Indicates whether the property is compatible with IdentityColumn.

    Declaration
    public static bool IsCompatibleIdentityColumn(IReadOnlyProperty property)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property

    The property.

    Returns
    Type Description
    System.Boolean

    true if compatible; otherwise, false.

    SetCharSet(IMutableProperty, String)

    Declaration
    public static string SetCharSet(this IMutableProperty property, string charSet)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property
    System.String charSet
    Returns
    Type Description
    System.String

    SetValueGenerationStrategy(IConventionProperty, Nullable<MySQLValueGenerationStrategy>, Boolean)

    Sets the MySQLValueGenerationStrategy to use for the property.

    Declaration
    public static MySQLValueGenerationStrategy? SetValueGenerationStrategy(this IConventionProperty property, MySQLValueGenerationStrategy? value, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property

    The property.

    System.Nullable<MySQLValueGenerationStrategy> value

    The strategy to use.

    System.Boolean fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    System.Nullable<MySQLValueGenerationStrategy>

    The configured value.

    SetValueGenerationStrategy(IMutableProperty, Nullable<MySQLValueGenerationStrategy>)

    Sets the MySQLValueGenerationStrategy to use for the property.

    Declaration
    public static void SetValueGenerationStrategy(this IMutableProperty property, MySQLValueGenerationStrategy? value)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property

    The property.

    System.Nullable<MySQLValueGenerationStrategy> value

    The strategy to use.

    In This Article
    • Methods
      • GetCharSet(IReadOnlyProperty)
      • GetValueGenerationStrategy(IReadOnlyProperty, StoreObjectIdentifier)
      • GetValueGenerationStrategyConfigurationSource(IConventionProperty)
      • IsCompatibleAutoIncrementColumn(IReadOnlyProperty)
      • IsCompatibleComputedColumn(IReadOnlyProperty)
      • IsCompatibleCurrentTimestampColumn(IReadOnlyProperty)
      • IsCompatibleIdentityColumn(IReadOnlyProperty)
      • SetCharSet(IMutableProperty, String)
      • SetValueGenerationStrategy(IConventionProperty, Nullable<MySQLValueGenerationStrategy>, Boolean)
      • SetValueGenerationStrategy(IMutableProperty, Nullable<MySQLValueGenerationStrategy>)
    Back to top Copyright © 2021, 2025, Oracle and/or its affiliates.