RuntimeProperty.SetElementType Method

Definition

Sets the element type for this property.

public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeElementType SetElementType (Type clrType, bool nullable = false, int? maxLength = default, bool? unicode = default, int? precision = default, int? scale = default, Type? providerPropertyType = default, Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter? valueConverter = default, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer? valueComparer = default, Microsoft.EntityFrameworkCore.Storage.Json.JsonValueReaderWriter? jsonValueReaderWriter = default, Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? typeMapping = default, bool primitiveCollection = false);
abstract member SetElementType : Type * bool * Nullable<int> * Nullable<bool> * Nullable<int> * Nullable<int> * Type * Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * Microsoft.EntityFrameworkCore.Storage.Json.JsonValueReaderWriter * Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping * bool -> Microsoft.EntityFrameworkCore.Metadata.RuntimeElementType
override this.SetElementType : Type * bool * Nullable<int> * Nullable<bool> * Nullable<int> * Nullable<int> * Type * Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * Microsoft.EntityFrameworkCore.Storage.Json.JsonValueReaderWriter * Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping * bool -> Microsoft.EntityFrameworkCore.Metadata.RuntimeElementType
Public Overridable Function SetElementType (clrType As Type, Optional nullable As Boolean = false, Optional maxLength As Nullable(Of Integer) = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional precision As Nullable(Of Integer) = Nothing, Optional scale As Nullable(Of Integer) = Nothing, Optional providerPropertyType As Type = Nothing, Optional valueConverter As ValueConverter = Nothing, Optional valueComparer As ValueComparer = Nothing, Optional jsonValueReaderWriter As JsonValueReaderWriter = Nothing, Optional typeMapping As CoreTypeMapping = Nothing, Optional primitiveCollection As Boolean = false) As RuntimeElementType

Parameters

clrType
Type

The type of value the property will hold.

nullable
Boolean

A value indicating whether this property can contain null.

maxLength
Nullable<Int32>

The maximum length of data that is allowed in this property.

unicode
Nullable<Boolean>

A value indicating whether or not the property can persist Unicode characters.

precision
Nullable<Int32>

The precision of data that is allowed in this property.

scale
Nullable<Int32>

The scale of data that is allowed in this property.

providerPropertyType
Type

The type that the property value will be converted to before being sent to the database provider.

valueConverter
ValueConverter

The custom ValueConverter set for this property.

valueComparer
ValueComparer

The ValueComparer for this property.

jsonValueReaderWriter
JsonValueReaderWriter

The JsonValueReaderWriter for this property.

typeMapping
CoreTypeMapping

The CoreTypeMapping for this property.

primitiveCollection
Boolean

A value indicating whether this property represents a primitive collection.

Returns

The newly created property.

Applies to