Class MySQLPropertyExtensions
Extension methods for Microsoft.
Inheritance
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. |
property | The property that defines a column's character set. |
Returns
Type | Description |
---|---|
System. |
The name of the charset or null, if no explicit charset was set. |
GetValueGenerationStrategy(IReadOnlyProperty, StoreObjectIdentifier)
Returns the My
If no strategy is set for the property, then the strategy to use will be taken from the Microsoft.
Declaration
public static MySQLValueGenerationStrategy? GetValueGenerationStrategy(this IReadOnlyProperty property, StoreObjectIdentifier storeObject = default(StoreObjectIdentifier))
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
property | |
Microsoft. |
storeObject |
Returns
Type | Description |
---|---|
System. |
The strategy, or None if none was set. |
GetValueGenerationStrategyConfigurationSource(IConventionProperty)
Returns the Microsoft.
Declaration
public static ConfigurationSource? GetValueGenerationStrategyConfigurationSource(this IConventionProperty property)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
property | The property. |
Returns
Type | Description |
---|---|
System. |
The Microsoft. |
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. |
property | The property. |
Returns
Type | Description |
---|---|
System. |
true if compatible. |
IsCompatibleComputedColumn(IReadOnlyProperty)
Indicates whether the property is compatible with Computed
Declaration
public static bool IsCompatibleComputedColumn(IReadOnlyProperty property)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
property | The property. |
Returns
Type | Description |
---|---|
System. |
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. |
property | The property. |
Returns
Type | Description |
---|---|
System. |
true if compatible. |
IsCompatibleIdentityColumn(IReadOnlyProperty)
Indicates whether the property is compatible with Identity
Declaration
public static bool IsCompatibleIdentityColumn(IReadOnlyProperty property)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
property | The property. |
Returns
Type | Description |
---|---|
System. |
true if compatible; otherwise, false. |
SetCharSet(IMutableProperty, String)
Declaration
public static string SetCharSet(this IMutableProperty property, string charSet)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
property | |
System. |
charSet |
Returns
Type | Description |
---|---|
System. |
SetValueGenerationStrategy(IConventionProperty, Nullable<MySQLValueGenerationStrategy>, Boolean)
Sets the My
Declaration
public static MySQLValueGenerationStrategy? SetValueGenerationStrategy(this IConventionProperty property, MySQLValueGenerationStrategy? value, bool fromDataAnnotation = false)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
property | The property. |
System. |
value | The strategy to use. |
System. |
fromDataAnnotation | Indicates whether the configuration was specified using a data annotation. |
Returns
Type | Description |
---|---|
System. |
The configured value. |
SetValueGenerationStrategy(IMutableProperty, Nullable<MySQLValueGenerationStrategy>)
Sets the My
Declaration
public static void SetValueGenerationStrategy(this IMutableProperty property, MySQLValueGenerationStrategy? value)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
property | The property. |
System. |
value | The strategy to use. |