Search Results for

    Show / Hide Table of Contents

    Class MySQLKeyExtensions

    Extension methods for Microsoft.EntityFrameworkCore.Metadata.IKey for MySQL-specific metadata.

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

    Methods

    GetPrefixLengthConfigurationSource(IConventionKey)

    Returns the Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource for prefix lengths of the key.

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

    The property.

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

    The Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource for prefix lengths of the key.

    PrefixLength(IKey)

    Returns prefix lengths for the key.

    Declaration
    public static int[] PrefixLength(this IKey key)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.IKey key

    The key.

    Returns
    Type Description
    System.Int32[]

    The prefix lengths. A value of 0 indicates, that the full length should be used for that column.

    SetPrefixLength(IConventionKey, Int32[], Boolean)

    Sets prefix lengths for the key.

    Declaration
    public static void SetPrefixLength(this IConventionKey key, int[] values, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.IConventionKey key

    The key.

    System.Int32[] values

    The prefix lengths to set. A value of 0 indicates, that the full length should be used for that column.

    System.Boolean fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    SetPrefixLength(IMutableKey, Int32[])

    Sets prefix lengths for the key.

    Declaration
    public static void SetPrefixLength(this IMutableKey key, int[] values)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.IMutableKey key

    The key.

    System.Int32[] values

    The prefix lengths to set. A value of 0 indicates, that the full length should be used for that column.

    In This Article
    • Methods
      • GetPrefixLengthConfigurationSource(IConventionKey)
      • PrefixLength(IKey)
      • SetPrefixLength(IConventionKey, Int32[], Boolean)
      • SetPrefixLength(IMutableKey, Int32[])
    Back to top Copyright © 2021, 2025, Oracle and/or its affiliates.