語言

MutablePropertyExtensions 類別

定義

警告

Use IMutableProperty

的 IMutableProperty擴展方法 。

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

方法

名稱 Description
FindContainingPrimaryKey(IMutableProperty)
已淘汰.

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

FindFirstPrincipal(IMutableProperty)
已淘汰.

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

FindPrincipals(IMutableProperty)
已淘汰.

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

GetContainingForeignKeys(IMutableProperty)
已淘汰.

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

GetContainingIndexes(IMutableProperty)
已淘汰.

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

GetContainingKeys(IMutableProperty)
已淘汰.

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

GetContainingPrimaryKey(IMutableProperty)
已淘汰.

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

IsUnicode(IMutableProperty, Nullable<Boolean>)
已淘汰.

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

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

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

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

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

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

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

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

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

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

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

SetKeyValueComparer(IMutableProperty, ValueComparer)
已淘汰.

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

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

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

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

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

SetProviderClrType(IMutableProperty, Type)
已淘汰.

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

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

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

SetStructuralValueComparer(IMutableProperty, ValueComparer)
已淘汰.

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

SetTypeMapping(IMutableProperty, CoreTypeMapping)
已淘汰.

為給定性質設定 。CoreTypeMapping

SetValueComparer(IMutableProperty, ValueComparer)
已淘汰.

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

SetValueConverter(IMutableProperty, ValueConverter)
已淘汰.

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

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

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

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

適用於