Search Results for

    Show / Hide Table of Contents

    Class MySQLPropertyBuilderExtensions

    Represents the implementation of MySQL property-builder extensions used in Fluent API.

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

    Methods

    ForMySQLHasCharset(EntityTypeBuilder, String)

    Adds the character set to an entity.

    Declaration
    public static EntityTypeBuilder ForMySQLHasCharset(this EntityTypeBuilder entityTypeBuilder, string charset)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder entityTypeBuilder

    Entity type builder.

    System.String charset

    MySQL character set to use.

    Returns
    Type Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder

    Entity type builder with a character set.

    ForMySQLHasCharset(PropertyBuilder, String)

    Adds the character set to an entity property.

    Declaration
    public static PropertyBuilder ForMySQLHasCharset(this PropertyBuilder propertyBuilder, string charset)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder

    Property builder.

    System.String charset

    MySQL character set to use.

    Returns
    Type Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder

    Property builder with a character set.

    ForMySQLHasCollation(EntityTypeBuilder, String)

    Adds the collation to an entity.

    Declaration
    public static EntityTypeBuilder ForMySQLHasCollation(this EntityTypeBuilder entityTypeBuilder, string collation)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder entityTypeBuilder

    Entity type builder.

    System.String collation

    MySQL collation to use.

    Returns
    Type Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder

    Entity type builder with a collation.

    ForMySQLHasCollation(PropertyBuilder, String)

    Adds the collation to an entity property.

    Declaration
    public static PropertyBuilder ForMySQLHasCollation(this PropertyBuilder propertyBuilder, string collation)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder

    Property builder.

    System.String collation

    MySQL collation to use.

    Returns
    Type Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder

    Property builder with a collation.

    ForMySQLHasDefaultValue(PropertyBuilder, Object)

    Defines the default value for a column.

    Declaration
    public static PropertyBuilder ForMySQLHasDefaultValue(this PropertyBuilder propertyBuilder, object value = null)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder

    Entity property to be set.

    System.Object value

    Default value.

    Returns
    Type Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder

    Property builder of a MySQL column with a default value.

    ForMySQLHasDefaultValueSql(PropertyBuilder, String)

    Defines the default value expression for a column.

    Declaration
    public static PropertyBuilder ForMySQLHasDefaultValueSql(this PropertyBuilder propertyBuilder, string sql)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder

    Entity property to be set.

    System.String sql

    Default value expression.

    Returns
    Type Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder

    Property builder of a MySQL column with a default value.

    UseMySQLAutoIncrementColumn(PropertyBuilder, String)

    Defines a MySQL auto-increment column.

    Declaration
    public static PropertyBuilder UseMySQLAutoIncrementColumn(this PropertyBuilder propertyBuilder, string typeName)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder

    Entity property to be set.

    System.String typeName

    MySQL column type as string.

    Returns
    Type Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder

    Property builder of the auto-increment column.

    In This Article
    • Methods
      • ForMySQLHasCharset(EntityTypeBuilder, String)
      • ForMySQLHasCharset(PropertyBuilder, String)
      • ForMySQLHasCollation(EntityTypeBuilder, String)
      • ForMySQLHasCollation(PropertyBuilder, String)
      • ForMySQLHasDefaultValue(PropertyBuilder, Object)
      • ForMySQLHasDefaultValueSql(PropertyBuilder, String)
      • UseMySQLAutoIncrementColumn(PropertyBuilder, String)
    Back to top Copyright © 2021, 2025, Oracle and/or its affiliates.