ConventionPropertyExtensions.SetProviderClrType 方法

定義

設定屬性值在傳送給資料庫提供者之前,將轉換成的類型。

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

參數

property
IConventionProperty

屬性。

providerClrType
Type

要使用的類型,或 null 移除任何先前設定的類型。

fromDataAnnotation
Boolean

指出是否已使用資料批註指定組態。

傳回

已設定的值。

適用於