RelationalPropertyExtensions.SetColumnType Method

Definition

Overloads

SetColumnType(IConventionProperty, String, Boolean)

Sets the database type of the column to which the property is mapped.

SetColumnType(IMutableProperty, String)

Sets the database type of the column to which the property is mapped.

SetColumnType(IConventionProperty, String, Boolean)

Sets the database type of the column to which the property is mapped.

public static void SetColumnType (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, string value, bool fromDataAnnotation = false);
public static string SetColumnType (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, string value, bool fromDataAnnotation = false);
public static string? SetColumnType (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, string? value, bool fromDataAnnotation = false);
static member SetColumnType : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * string * bool -> unit
static member SetColumnType : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * string * bool -> string
<Extension()>
Public Sub SetColumnType (property As IConventionProperty, value As String, Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetColumnType (property As IConventionProperty, value As String, Optional fromDataAnnotation As Boolean = false) As String

Parameters

property
IConventionProperty

The property.

value
String

The value to set.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The configured value.

Applies to

SetColumnType(IMutableProperty, String)

Sets the database type of the column to which the property is mapped.

public static void SetColumnType (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, string value);
public static void SetColumnType (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, string? value);
static member SetColumnType : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty * string -> unit
<Extension()>
Public Sub SetColumnType (property As IMutableProperty, value As String)

Parameters

property
IMutableProperty

The property.

value
String

The value to set.

Applies to