語言

ConventionPropertyExtensions 類別

定義

警告

Use IConventionProperty

的 IConventionProperty擴展方法 。

public static class ConventionPropertyExtensions
[System.Obsolete("Use IConventionProperty")]
public static class ConventionPropertyExtensions
type ConventionPropertyExtensions = class
[<System.Obsolete("Use IConventionProperty")>]
type ConventionPropertyExtensions = class
Public Module ConventionPropertyExtensions
繼承
ConventionPropertyExtensions
屬性

方法

名稱 Description
FindContainingPrimaryKey(IConventionProperty)
已淘汰.

取得使用該屬性的主鍵(包括包含該屬性的複合主鍵)。

FindFirstPrincipal(IConventionProperty)
已淘汰.

若該屬性是外鍵的一部分,則找到該屬性所受約束的第一個主要性質。

FindPrincipals(IConventionProperty)
已淘汰.

尋找包含該屬性的清單,若該屬性屬於外鍵,則該屬性受限制。

GetAfterSaveBehaviorConfigurationSource(IConventionProperty)
已淘汰.

回傳 的 GetAfterSaveBehavior(IProperty)配置來源。

GetBeforeSaveBehaviorConfigurationSource(IConventionProperty)
已淘汰.

回傳 的 GetBeforeSaveBehavior(IProperty)配置來源。

GetContainingForeignKeys(IConventionProperty)
已淘汰.

取得所有使用此屬性的外鍵(包括包含此屬性的複合外鍵)。

GetContainingIndexes(IConventionProperty)
已淘汰.

取得所有使用此屬性的索引(包括包含此屬性的複合索引)。

GetContainingKeys(IConventionProperty)
已淘汰.

取得所有使用此屬性的主鍵或備用鍵(包括包含此屬性的複合鍵)。

GetIsUnicodeConfigurationSource(IConventionProperty)
已淘汰.

回傳 的 IsUnicode(IProperty)配置來源。

GetKeyValueComparerConfigurationSource(IConventionProperty)
已淘汰.

回傳 的 GetKeyValueComparer()配置來源。

GetMaxLengthConfigurationSource(IConventionProperty)
已淘汰.

回傳 的 GetMaxLength(IProperty)配置來源。

GetPrecisionConfigurationSource(IConventionProperty)
已淘汰.

回傳 的 GetPrecision(IProperty)配置來源。

GetProviderClrTypeConfigurationSource(IConventionProperty)
已淘汰.

回傳 的 GetProviderClrType(IProperty)配置來源。

GetScaleConfigurationSource(IConventionProperty)
已淘汰.

回傳 的 GetScale(IProperty)配置來源。

GetStructuralValueComparerConfigurationSource(IConventionProperty)
已淘汰.

回傳 的 GetStructuralValueComparer(IProperty)配置來源。

GetTypeMappingConfigurationSource(IConventionProperty)
已淘汰.

得到 ConfigurationSource 的 FindTypeMapping(IProperty)。

GetValueComparerConfigurationSource(IConventionProperty)
已淘汰.

回傳 的 GetValueComparer(IProperty)配置來源。

GetValueConverterConfigurationSource(IConventionProperty)
已淘汰.

回傳 的 GetValueConverter(IProperty)配置來源。

GetValueGeneratorFactoryConfigurationSource(IConventionProperty)
已淘汰.

回傳 的 GetValueGeneratorFactory(IProperty)配置來源。

SetAfterSaveBehavior(IConventionProperty, Nullable<PropertySaveBehavior>, Boolean)
已淘汰.

設定一個值,表示該屬性在實體儲存到資料庫後是否能被修改。

若 Throw,則在該實體存在於資料庫後,若該屬性被賦予新值,則會拋出例外。

若 Ignore,則資料庫中已存在的實體屬性值任何修改將被忽略。

SetBeforeSaveBehavior(IConventionProperty, Nullable<PropertySaveBehavior>, Boolean)
已淘汰.

設定一個值,表示該屬性是否能在實體儲存到資料庫前被修改。

若 Throw,則當該屬性在狀態中 Added 被賦值時,將拋出異常。

若 Ignore,則任何值集合在狀態 Added 下都會被忽略。

SetIsUnicode(IConventionProperty, Nullable<Boolean>, Boolean)
已淘汰.

設定一個值,表示此屬性是否能持久化 Unicode 字元。

SetKeyValueComparer(IConventionProperty, ValueComparer, Boolean)
已淘汰.

在執行關鍵比較時設定此屬性的慣例 ValueComparer 。

SetMaxLength(IConventionProperty, Nullable<Int32>, Boolean)
已淘汰.

設定此屬性允許的最大資料長度。 例如,若屬性為 String ',則為最大字元數。

SetPrecision(IConventionProperty, Nullable<Int32>, Boolean)
已淘汰.

設定此性質允許的資料精度。 例如,若性質為 a Decimal ,則為最大數字數。

SetProviderClrType(IConventionProperty, Type, Boolean)
已淘汰.

設定屬性值在送給資料庫提供者前會轉換成的型別。

SetScale(IConventionProperty, Nullable<Int32>, Boolean)
已淘汰.

設定此屬性允許的資料尺度。 例如,若性質為 a Decimal ,則此為最大小數位數。

SetStructuralValueComparer(IConventionProperty, ValueComparer, Boolean)
已淘汰.

為此物業設定結構複製的慣例 ValueComparer 。

SetTypeMapping(IConventionProperty, CoreTypeMapping, Boolean)
已淘汰.

為給定性質設定 。CoreTypeMapping

SetValueComparer(IConventionProperty, ValueComparer, Boolean)
已淘汰.

為這個物業設定了慣例 ValueComparer 。

SetValueConverter(IConventionProperty, ValueConverter, Boolean)
已淘汰.

為這個物業設定了慣例 ValueConverter 。

SetValueGeneratorFactory(IConventionProperty, Func<IProperty,IEntityType,ValueGenerator>, Boolean)
已淘汰.

設定工廠用於產生此屬性的數值,或 null 清除先前設定的任何工廠。

設定 null 不會關閉這個屬性的值產生,它只是清除任何明確設定為此屬性的產生器。 資料庫提供者仍可能擁有屬性類型的值產生器。

適用於