Class MySQLPropertyBuilderExtensions
Represents the implementation of MySQL property-builder extensions used in Fluent API.
Inheritance
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. |
entityTypeBuilder | Entity type builder. |
System. |
charset | MySQL character set to use. |
Returns
Type | Description |
---|---|
Microsoft. |
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. |
propertyBuilder | Property builder. |
System. |
charset | MySQL character set to use. |
Returns
Type | Description |
---|---|
Microsoft. |
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. |
entityTypeBuilder | Entity type builder. |
System. |
collation | MySQL collation to use. |
Returns
Type | Description |
---|---|
Microsoft. |
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. |
propertyBuilder | Property builder. |
System. |
collation | MySQL collation to use. |
Returns
Type | Description |
---|---|
Microsoft. |
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. |
propertyBuilder | Entity property to be set. |
System. |
value | Default value. |
Returns
Type | Description |
---|---|
Microsoft. |
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. |
propertyBuilder | Entity property to be set. |
System. |
sql | Default value expression. |
Returns
Type | Description |
---|---|
Microsoft. |
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. |
propertyBuilder | Entity property to be set. |
System. |
typeName | MySQL column type as string. |
Returns
Type | Description |
---|---|
Microsoft. |
Property builder of the auto-increment column. |